[cups] Monitoring concurrent print jobs

Jörg Thümmler listen at vordruckleitverlag.de
Mon Jun 19 22:49:30 PDT 2023


Am 20.06.23 um 02:03 schrieb Dave Close:
> I have a client using CUPS from an application which is licensed
> according to the number of concurrent print jobs. I think he's paid
> for more licenses than he actually needs. But trying to discover the
> actual number of concurrently active jobs (to any printer) has me
> stymied. The CUPS log files don't seem to provide enough information.
> 
> It appears that most or all jobs start with a "Create-Job" entry in
> cups/access_log. Most or all also seem to end with a "Send-Document"
> entry. But looking through several months of logs, those entries
> don't balance. I also see "Cancel-Job" entries that don't reference
> a printer, leaving me wondering. Sometimes I see several consecutive
> "Cancel-Job" entries where, near as I can tell, there should be no
> active jobs.
> 
> Is there a better way to get this information besides parsing the logs?

Hi,

strange licensing, never heard of...

1st: looking into my /var/log/cups/access.log I only found balanced 
Create-job and Send-document entries, always one by one... I remember 
other entries in times I had some printer troubles, but this should be 
the normal behavior.

2nd: I would set the variable MaxJobs in cupsd.conf to something large 
enough. After that you have the jobfiles (and the documents) - on 
linuxes they should be in /var/spool/cups. Jobfiles are named cXXXXXX, 
the XXXXXX is the job number. In these jobfiles you found all 
information about the job, so you can find the job creating user here, 
which I believe is what you need to separate the jobs of the app. With 
the time entries in the file there you should be able to find 
concurrently active jobs, maybe with the "help" of the logfiles entries, 
although (at least on my system, but maybe it's configureable) you don't 
find the job number here...

hth
-- 
cu

jth



More information about the cups mailing list