System Administration Guide: Solaris Printing

History Log Files

The LP print service records a history of printing services in two log files, lpsched and requests. These log files are located in the /var/lp/logs directory. You can use the information in these log files to diagnose and troubleshoot printing problems. An example of the contents of the /var/lp/logs directory is as follows:


# cd /var/lp/logs
# ls
lpsched.1    requests    requests.2
lpsched      lpsched.2   requests.1
# 

The two most important log files for troubleshooting are the following:

The requests log file has a simple structure so that you can extract data using common UNIX shell commands. Requests are listed in the order they are printed. They are also separated by lines showing their request IDs. Each line below the separator line, the line that starts with =, is marked with a single letter that identifies the kind of information contained in that line. Each letter is separated from the data by a single space.

The following example shows the contents of a requests log file:


# pwd
/var/lp/logs
# tail requests.2
= print1-3, uid 0, gid 1, size 206662, Wed Mar 14 08:56:30 MST 2003
z print1
C 1
D print1
F /usr/dict/words
P 20
T /usr/dict/words
t simple
U root
s 0x0014
v 2
#

The following table shows the letter codes and the content of their corresponding lines in the requests log file.

Table 11–6 Codes in the requests Log File

Letter 

Content of Line 

=

The separator line, which contains the following items: request ID, user ID (UID), and group IDs (GIDs) of the user, the total number of bytes in the original (unfiltered) file size, and the time when the request was queued. 

z

The name of the printer. 

C

The number of copies printed. 

D

The printer or class destination, or the word any.

F

The name of the file printed. The line is repeated for each file printed. Files were printed in the order shown. 

f

(Optional) The name of the form used. 

H

(Optional) One of three types of special handling: resume, hold, and immediate.  

N

(Optional) The type of alert used when the print request was successfully completed. The type is the letter M if the user was notified by email or W if the user was notified by a message to the terminal.

O

(Optional) The printer-dependent -o options. For example, nobanner.

P

The priority of the print request. 

p

The list of pages printed. 

r

(Optional) A single-letter line that is included if the user asked for “raw” processing of the files with the lp -r command.

S

(Optional) The character set, print wheel, or cartridge used. 

T

The title placed on the banner page. 

t

The type of content found in the files. 

U

The name of the user who submitted the print request. 

s

The outcome of the request, shown as a combination of individual bits expressed in hexadecimal format. Several bits are used internally by the print service. The bits and what they mean are described in the following table. 

v

  • 0 — Identifies that the print job originated from the in.1pd print daemon or another system on the network.

  • 2 — Identifies that the print job originated from the /usr/bin/lp or /usr/ucb/lpr commands.

  • 1 — Identifies that the print job originated from an older version of the printing software.

x

(Optional) The slow filter used for the print request. 

Y

(Optional) The list of special modes for the print filters used to print the request. 

z

(Optional) The printer used for the request. This printer differs from the destination (the D line) if the request was queued for any printer or a class of printers, or if the request was moved to another destination.

The following table shows the outcome codes in the LP requests log file and their descriptions.

Table 11–7 Outcome Codes in the requests Log File

Outcome Code 

Description 

0x0001

The request was held pending resume. 

0x0002

Slow filtering is running. 

0x0004

Slow filtering finished successfully. 

0x0008

The request is on the printer. 

0x0010

Printing finished successfully. 

0x0020

The request was held pending user change. 

0x0040

The request was canceled. 

0x0080

The request will print next. 

0x0100

The request failed filtering or printing. 

0x0200

The request is in transit to a remote printer (obsolete). 

0x0400

The user will be notified. 

0x0800

A notification is running. 

0x1000

A remote system has accepted the request (obsolete). 

0x2000

The administrator placed a hold on the request. 

0x4000

The printer had to change filters. 

0x8000

The request is temporarily stopped.