[cups.general] Page accounting

Helge Blischke H.Blischke at srz-berlin.de
Mon Jun 14 04:27:47 PDT 2004


Matthias Clasen wrote:
> 
> On Fri, 2004-06-11 at 07:49, Helge Blischke wrote:
> > Matthias Clasen wrote:
> > >
> > > I tried to analyse why I don't see reasonable page accounting
> > > information when I request "job-media-sheets" and
> > > "job-media-sheets-completed" for my jobs. Here is what I found:
> > >
> > > - Normally, pstops is responsible for emitting PAGE: m n messages,
> > >   except if there is another filter specified in the ppd file, e.g.
> > >   foomatic-rip
> > > - In that case, foomatic-rip is reponsible for emitting PAGE: m n
> > >   messages. To this end, it injects some PostScript code into the
> > >   job data which causes gs to emit PAGE: m n messages.
> > > - It then goes off to run the renderer using the cmdline specified
> > >   in the ppd file. Unfortunately, the "renderer" is not gs, but cat
> > >   if prefiltering is turned off for the queue...
> > >
> > > Turning on prefiltering fixes this part, but then the ipp backend
> > > emits a PAGE: total n line when it gets a "job-media-sheets-completed"
> > > attribute back from the remote side.
> > > Unfortunately, due to brokenness on the other side, the value is 0,
> > > so the job-media-sheets-completed value gets set back to 0 by the
> > > daemon. Shouldn't it maybe use MAX() there ?
> > >
> > > I'm not quite sure which parts are just my misunderstanding how
> > > page accounting is supposed to work, which parts are incompleteness
> > > of the cups ipp implementation, and which are honest bugs...
> > >
> > There is a system (based on Python) for accounting and quota handling
> > (which can be configured to do accounting only). Go to the respective
> > link on the CUPS home page for more details.
> >
> > If you are willing to tailor your own accounting system, I'd suggest to
> > feed the jobs through Ghostscript's (preferrably ESP gs) bbox device
> > which logs the bounding box for every page in the job; interpreting
> > the log for accounting purposes is then up to you. This approach would
> > have the advantage not to require DSC conformance - if would even work
> > for
> > "obfuscated postscript" (once there was a newsgroup on this topic).
> >
> 
> Hmm, this is just for ui feedback about the status of jobs, so I'd
> prefer to not introduce a complete accounting system, but rather rely on
> the IPP job-media-sheets and job-media-sheets-completed attributes and
> have cups support them properly. I would be really grateful if somebody
> with deeper cups knowledge could explain which parts of the above
> scenario are bugs and which are just my misunderstandings...
> 
Michael Sweet's CUPS book states that these attributes are not supported 
by CUPS (no hint on future versions here).

Helge


-- 
H.Blischke at srz-berlin.de
H.Blischke at srz-berlin.com
H.Blischke at acm.org




More information about the cups mailing list