Chapter 18. Accounting

Table of Contents
18.1. Accounting Printcap Options
18.2. Accounting File
18.3. Accessing Printer Hardware Pagecounters
18.4. Reliable Accounting
18.5. \LPRng accounting.pl Utility

In Academic institutions, avoiding printing accounting has been regarded as a challenge, an ongoing game of fat cat and poor starving mouse, between the Administration and the downtrodden, poor, over charged student. We will disregard the fact that if most students put as much effort into their studies as in finding ways to avoid accounting procedures then they would be Rhodes Scholar material, but I digress...

There are two approaches to printing accouting: use software methods to determine the number of pages that should be printed and use this as the recorded accouting information, or use a hardware level pagecounter on the printer to accurately determine the number of pages used. While the software method works well in a relatively error and security compromise free environment and where print jobs do not jam, for accurate account a hardware level pagecounter or some other method must be used. Thus, in the following section we assume that the printer has some sort of non-volatile page counter mechanism that is reliable and impervious to power on/off cycles and tampering by the users, and can be queried by the printing software.

18.1. Accounting Printcap Options

The accounting facilities are controlled and enabled by the following entries in the printcap file.

Tag Default Value Purpose
af NULL accounting file name
as "jobstart $H $n $P $k $b $t" accounting info for job start
ae "jobend $H $n $P $k $b $t" accounting info for job end
accounting_server NULL  
achk FALSE  
la TRUE do accounting for 'local' printer
ar FALSE do accounting for 'remote' transfers