page_log, "total"

Ryan Lovett ryan at stat.berkeley.edu
Wed Oct 13 16:56:39 PDT 2004


Michael Sweet wrote:
> ryan at stat.berkeley.edu wrote:
> 
>> Sometimes the page log says "total" instead of the number of pages in a
>> job. Does this mean that the number in the numcopies field then 
>> represents the total number of pages for that job?
>>
>> lp user1 2113 [08/Oct/2004:15:09:23 +0800] total 1 - localhost
>> lp user1 2113 [08/Oct/2004:15:09:33 +0800] total 1 - localhost
>> lp user1 2113 [08/Oct/2004:15:09:43 +0800] total 1 - localhost
>> lp user2 2114 [08/Oct/2004:15:11:05 +0800] total 1 - host1
>> lp user2 2114 [08/Oct/2004:15:11:15 +0800] total 1 - host1
>> lp user2 2115 [08/Oct/2004:16:03:32 +0800] total 0 - host2
>> lp user2 2115 [08/Oct/2004:16:03:42 +0800] total 1 - host2
>>
>> Did job 2113 print 1 page or 3?
>> Did job 2114 print 1 page or 2?
>> And what is up with job 2115? 0 pages or 1?
>>
>> I guess this all boils down to why cups uses 'total' rather than the
>> traditional page count. If the backend or filter sends cups 'total',
>> shouldn't it enter the info in the page log in a consistent manner?
> 
> 
> It would be useful to know what version of CUPS you are using, and
> what device URI you are using for printer "lp".
> 

Thanks for your reply. mylocalmachine has lp setup as parallel:/dev/lp0 
and user1 and user2 have CUPS_SERVER set to a remote machine, 
printserver, where lp is a queue that spools to mylocalmachine via 
http://mylocalmachine:631/printers/lp. The local machine also can 
receive LPR jobs.

mylocalmachine is a Debian box running 1.1.20final+rc1-7. Remote 
machines are other Debian boxes using cups and regular lpr, and Solaris 
boxes using lpr. printserver is running 1.1.19.

The 'total' flag is only there a small percentage of the time, but I 
wanted to know how to account for the entries in our local scripts. 
Could schedular/job.c handle this automatically and write normal entries 
into page_log?

On mylocalmachine, the page count is normal, but I do see 'total' on 
printserver. In the below cases, lpr is invoked with "-Plp onepage.ps"

A) Solaris# /usr/ucb/lpr
printserver's page_log:
lp user1 2120 [13/Oct/2004:16:16:33 +0800] 1 1 - mymachine.ipaddress
lp user1 2120 [13/Oct/2004:16:16:33 +0800] total 1 - mymachine.ipaddress
lp user1 2120 [13/Oct/2004:16:16:43 +0800] total 1 - mymachine.ipaddress

B) Solaris# CUPS_SERVER=printserver /usr/local/cups/bin/lpr
printserver's page_log:
lp user1 2121 [13/Oct/2004:16:26:05 +0800] 1 1 - solaris.ipaddress
lp user1 2121 [13/Oct/2004:16:26:05 +0800] total 0 - solaris.ipaddress
lp user1 2121 [13/Oct/2004:16:26:15 +0800] total 1 - solaris.ipaddress

C) Solaris# CUPS_SERVER=mylocalmachine /usr/local/cups/bin/lpr
printserver's page_log:
(nothing, doesn't go through printserver)

D) Debian# CUPS_SERVER=printserver /usr/bin/lpr
printserver:page_log:
lp user1 2122 [13/Oct/2004:16:31:04 +0800] 1 1 - debian.ipaddress
lp user1 2122 [13/Oct/2004:16:31:04 +0800] total 1 - debian.ipaddress
lp user1 2122 [13/Oct/2004:16:31:14 +0800] total 1 - debian.ipaddress

E) Debian# CUPS_SERVER=mylocalmachine /usr/bin/lpr
printserver's page_log:
(nothing, doesn't go through printserver)

It seems like in test A, the job goes from Solaris to mylocalmachine via 
LPR. The LPR daemon then sends it to CUPS_SERVER (printserver) which 
then delivers it back to mylocalmachine. I thought that the CUPS LPR 
daemon wouldn't use CUPS_SERVER for some reason. (To prevent the last 
needless exchange, do I need to wrap the LPR daemon with an env script?)

Maybe test B is different from test D since the CUPS lpr client is a 
different version.

Anyways, back to the original point. :) the 'total' entries seems 
completely unnecessary now. Is there any way to disable it?


This is probably way more information than you needed to know,
Ryan

PS- Thanks for looking into this too Helge.




More information about the cups mailing list