Penguin
Note: You are viewing an old revision of this page. View the current version.

Below are some of my notes regarding getting print accounting working with cups.


Use postscript where possible

A lot of the notes I read imply that decent accounting is impossible if you send PCL to cups. What you should be doing is sending PS, and having CUPS re-render it in PCL for you. Or something like that.


Check your PPDs

If you can at all, use a vendor provided PPD. I have an HP 4550 Color Laserjet printer on my network, and I was using the foomatic PPD that comes with cups. All fine and good, it prints just fine, however I discovered that I was getting no accounting information out of it at all. I discovered that setting the clients to use the PCL driver as opposed to the PS driver meant that it would at least do trivial job account.

I changed to the HP provided PPD (from the windows driver package), and things started working!


Pykota

I set up PyKota to do some simple accounting. Pykota is really a quota/billing system, but I don't care about quotas or billing, so just set it up to give everyone large quotas and forget about it.

Pykota handles accounting in a couple of possible ways. It can do naive page counting, if you pass it PostScript. This isn't the best method, as it doesn't actually tell you how many pages were printed! It also has a couple of methods of asking the printer itself how many pages were printed. This will only work with network-attached printers, and only if the device attaching the printer to the network has some page accounting stuff itself (ie, any HP Jetdirect card, or any printer at all with a network card in it).

The first method involves an snmp poll of the printer after the job finishes, which inspects the page counter. The second involves sending some PJL or PS code to the printer, to do the same thing. Both of these are nicer than the naive method in that they account for the number of pages actually printed, however they rely on this cups/accounting server being the only machine that directly talks to the printers in question