Unix systems which use the BSD/
lpd-style spooling subsystem also usually
offer printing accounting via the
utility. Printer accounting is enabled with the af field in its
/etc/printcap entry. For example, this entry designates
/var/adm/ps1_acct as the accounting file for this
laser|postscript|ps1:\ :lp=/dev/lp:sd=/var/spool/ps1:if=/usr/local/sbin/filt:\ :mx#0:
For text printers, the pw and pl fields (page width and length, in characters and lines, respectively) are used to generate accounting data. For other printer types, a more sophisticated approach is required.
Under AIX, printing accounting is enabled by adding an acctfile keyword to the queue definition stanza in /etc/qconfig:
laser: device = dlas1,dlas2 header = group trailer = never
acctfile = /var/adm/qacct...
This line may be added with a text editor, by using the
chque command, or by using SMIT, but in any
case, the queue should be stopped first (for example, with
enq -D) and then restarted after
reconfiguration (see Chapter 13 for
Merely defining the accounting file field will not in itself cause accounting records to be created. The facility requires support for accounting data from the filter(s) used to process the print jobs. There are many filters available that include this functionality. See Chapter 13 for more information about filters. Printing accounting, including techniques for generating the required ...