Chapter 18. Accounting

Table of Contents
18.1. Accounting Printcap Options
18.2. Accounting Information
18.3. Accounting File
18.4. Authorization and Quotas
18.5. Accessing Printer Hardware Pagecounters
18.6. Reliable Accounting
18.7. 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 brutal and corrupt Administration and the poor, downtrodden, 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 accounting: use software determine the number of pages that should be printed or use a hardware pagecounter facility 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. LPRng provides facilities to use either method to determine page counts.

There are also two methods available to store the actual accounting information: the simple save to file method and the more complex save to program method. LPRng provides support for both methods.

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
max_accounting_file_size 100 max accounting file size (in Kbytes)
min_accounting_file_size 10 min accounting file size (in Kbytes)
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
achk FALSE  
la TRUE do accounting for 'local' printer
ar FALSE do accounting for 'remote' transfers