page_log: multiple lines of the same job

Helge Blischke h.blischke at srz.de
Mon Aug 15 06:42:00 PDT 2005


milman at cs.bgu.ac.il wrote:
> 
> Hello all,
> 
> I have 2 printers and both of them using pstops filter, that also count the pages.
> 
> I'm working on Debian testing on Sparc, CUPS ver 1.1.23-11.
> 
> The PPD files are from the official web sites of the vendors, and in the Xerox case, I removed the call to pstoxeroxps filter, which doesn't exist (and now the Xerox printer is using the pstops filter).
> 
> The second printer is an old QMS printer. There is no call to filter from the PPD file.
> 
> When I print file of 3 pages, I got this:
> 
> cups-lpzbs milmanu 35 [15/Aug/2005:14:43:15 +0300] 1 1 - 132.72.45.121
> cups-lpzbs milmanu 35 [15/Aug/2005:14:43:16 +0300] 2 1 - 132.72.45.121
> cups-lpzbs milmanu 35 [15/Aug/2005:14:43:18 +0300] 3 1 - 132.72.45.121
> 
> It seems that it calls pstops 3 times:
> 
> > cat error_log|grep 14:43|grep pstops
> D [15/Aug/2005:14:43:15 +0300] StartJob: filter = "/usr/lib/cups/filter/pstops"
> D [15/Aug/2005:14:43:15 +0300] start_process("/usr/lib/cups/filter/pstops", 0xefff01ec, 0xeffef764, 10, 12, 8)
> I [15/Aug/2005:14:43:15 +0300] Started filter /usr/lib/cups/filter/pstops (PID 1083) for job 35.
> 
> and also find 3 different %%Page symbols:
> 
> /var/log/cups# cat error_log|grep 14:43|grep %%Page
> D [15/Aug/2005:14:43:15 +0300] [Job 35] 0 %%Pages: atend
> D [15/Aug/2005:14:43:15 +0300] [Job 35] 0 %%PageHeader
> D [15/Aug/2005:14:43:15 +0300] [Job 35] 0 %%Page: 1 1
> D [15/Aug/2005:14:43:15 +0300] [Job 35] 0 %%Page: 1 1
> D [15/Aug/2005:14:43:15 +0300] [Job 35] 0 %%PageOrientation: Portrait
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%PageTrailer
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%PageHeader
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%Page: 2 2
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%PageOrientation: Portrait
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%PageTrailer
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%PageHeader
> D [15/Aug/2005:14:43:16 +0300] [Job 35] 0 %%Page: 3 3
> D [15/Aug/2005:14:43:18 +0300] [Job 35] 0 %%PageOrientation: Portrait
> D [15/Aug/2005:14:43:18 +0300] [Job 35] 0 %%PageTrailer

No, the pstops filter is started only once; the three messages reflect three
different logging points in the scheduler and filter chain, respectively.
As for the page log, each page is logged with the actual number of copies for that
page.
Of course this log format is arguable, but you may easily hack a little script that
digests the page log to your needs.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups mailing list