Specifications

6-4
Guide to Printers and Printing
run separately by the spooling daemon to avoid tying up a printer. Fast filters are run so
their output goes directly to the printer; thus, they can exert control over the printer.
Print Request Log
Each time a user sends a job to the printer, the print service creates two files that describe
the job request and places one each in the /usr/spool/lp/temp and /usr/spool/lp/requests
directories. The information about the job is split into two files so that the system can keep
sensitive information secure in the /usr/spool/lp/requests directory. The user who
submitted the job has access to the request file in /usr/spool/lp/temp; only the printer
administrator (or root user) has access to the file in /usr/spool/lp/requests.
The request files remain in these directories only while the job is in the queue. When the job
finishes printing, the information in the two files is combined and appended to the request
log, /usr/spool/lp/logs/requests.
The structure of the request log allows you to extract data using common shell commands.
The requests are listed in the order in which they were printed, separated by lines that begin
with the request ID. Each line below the separator line is marked with a single letter, the
request log code, that identifies the kind of information contained in the line. Each letter is
separated from the data by a single space. The table following the sample entry describes
these codes.
Following is a sample entry from the print request log:
= ps–717, uid 1532, gid 18, size 7872, Tue May 10 14:43:10 1994
z ps
C 1
D ps
F /usr/spool/lp/temp/717–1
P 20
t simple
U hanna
s 0x0010
Request Log Entries
Letter
Content of line
= The separator line lists the (comma–separated) request ID, user ID
(uid), and group ID (gid) of the user who submitted the request, total
number of bytes in the original (unfiltered) file (size), and the date and
time the request was queued.
C Number of copies printed.
D Printer or class destination or the word any.
F Name of the file in the /usr/spool/lp/temp directory. This line is
repeated for each file printed, and files are printed in the order given.
f Form name used (if applicable).
H Type of special handling used:
resume
hold
immediate
N How the print service notified the user after printing the file (if
applicable):
M by an electronic mail message
W by a message written to the users terminal
O Any –o options given to the lp command.