AutoPurge/MaxJobsPerPrinter on a single Queue

Kurt Pfeifle k1pfeifle at gmx.net
Fri Oct 12 07:30:03 PDT 2007


Helge Blischke wrote:
> David Montminy wrote:
>>> David Montminy wrote:
>>>
>>>>> David Montminy wrote:
>>>>>
>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> Is there any way to define a different "MaxJobsPerPrinter" for
>>>>>> each queue?
>>>>>>
>>>>>> I'm trying to setup Cups to retain documents from certain queues
>>>>>> and automatically purge documents from the others.
>>>>>>
>>>>>> We have 2 "type" of queue on the print server:
>>>>>> 1)From automated applications (Such as Pay Roll)
>>>>>> 2)User-generated
>>>>>>
>>>>>> These are different printers, but the jobs are generated on the
>>>>>> same server (running as print server). The automated jobs have to
>>>>>> be kept for at least a month.
>>>>>>
>>>>>> I've tried a couple of combinations of the "MaxJobs",
>>>>>> "AutoPurgeJobs", "MaxJobsPerPrinter" and Quotas but I cannot get
>>>>>> the User-generated queues empty of old re-printable jobs. It
>>>>>> simply keeps everything up to the limit  defined by "MaxJobs" or
>>>>>> "MaxJobsPerPrinter".
>>>>>>
>>>>>> Is there something I misunderstood?
>>>>>>
>>>>>> David Montminy
>>>>>
>>>>> Perhaps you may set up 2 CUPS instances which advertize their printers
>>>>> to the other.
>>>>>
>>>>> Helge
>>>>>
>>>>> -- 
>>>>> Helge Blischke
>>>>> Softwareentwicklung
>>>>>
>>>>> H.Blischke at acm.org
>>>>
>>>>
>>>> I wish I could. This is a Legacy system with 2000+ COBOL
>>>> applications, so any major change to the printer queues might break
>>>> something...
>>>>
>>>> I can change the back-end, but the way the applications interface
>>>> with the system (including queue names) must stay the same...
>>>>
>>>> David Montminy
>>>
>>> .... or you set up a CUPS server as sort of "dispatcher" server which
>>> simply forwards
>>> the jobs to the respective "real" CUPS server. Thus, your legacy
>>> applications all
>>> talk to the dispatcher as they used to ...
>>>
>>> Helge
>>>
>>>
>>> -- 
>>> Helge Blischke
>>> Softwareentwicklung
>>>
>>> H.Blischke at acm.org
>>
>>
>> Is there any way to install cups twice on a single server? Because a
>> new server is not an option in my case.
>>
>> David Montminy
>>
> 
> Yes, you only need to specify different ports for each one.

....or different unix domain sockets, and no TCP/UDP port at all for
one or both of them (but your CUPS web interface will not work with
domain socket connectivity only). If you need to access a specific
one of the two servers, you need to set the environment variable to
the respective server:

    CUPS_SERVER=/path/to/cups1.sock lpstat -v
    CUPS_SERVER=/path/to/cups2.sock lpoptions -p printername -l
    etc.

If there is no TCP/UDP socket, no remote printing will be possible,
but local printing will work just fine.

Careful however!

It is probably *NOT* enough to specify different Ports and/or domain
sockets. You'll probably want to separate spool directories as well as
logfiles and SERVER_ROOT and a bunch of other things too...


-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list