The lpsched
and requests
log
files in the /var/lp/logs
directory grow as information
is appended. The LP print service uses a default cron job
to clean out the log files. The lp cron job
is located in the /var/spool/cron/crontabs/lp
file. The cron job periodically moves the contents of the log files. The contents
of log
are moved to log
.1
, and the contents of log
.1
are
moved to log
.2
. The contents
of log
.2
are lost (that is,
replaced by the former contents of log
.1
)
when log
.2
gets overwritten.
How to Change Frequency of Printer Request Log Rotation
The requests
log file on the printer server is
rotated weekly rather than daily. You can change the rotation interval back
to daily if the printer server is busy.
Become superuser or lp
,
or assume an equivalent role on the print server.
Set the EDITOR
environment
variable.
#EDITOR=vi
#export EDITOR
Edit the lp
crontab
file.
# crontab -e lp
Change the first line of the file that rotates
the requests
log files every Sunday (0
)
to an asterisk (*
) for daily rotation:
13 3 * * *
cd /var/lp/logs; if [ -f requests ]; then if
[ -f requests.1 ]; then /bin/mv requests.1 requests.2; fi; /usr/bin/cp
requests requests.1; >requests; fi
Save the file and exit.
The print request follows the same path it would if the client and server were separate systems. Requests always flow from client to server following the same path.
The following figure shows what happens when a user submits a request to print a PostScript file on a local printer, which is a printer connected to the user's system. The lpsched daemon on the local system does all processing. This processing might include the following:
Matching the printer and content type
Identifying the default printer, filtering the request
Starting the specified printer interface program
The printer interface program does the following:
Prints the banner page.
Catches printer faults.
Determines the printer fault policy to either reset, continue, or begin the print job over again.
Finally, the interface program uses the lpcat program to download the print request to the local printer's serial port.
The following figure shows what happens when a user on a Solaris print client submits a print request to an lpd-based print server. The command opens a connection and handles its own communications with the print server directly.
The following figure shows an lpd-based print client
submitting a print request to a Solaris print server. The lpd
daemon
handles the local part of the print request and the connection to the print
server. On the print server, the inetd
process waits for
network printing requests and starts a protocol adaptor to service the request.
The protocol adaptor communicates with the lpsched
daemon,
which processes the request on the print server.
The following figure shows what happens when a user on a Solaris print client submits a print request to a Solaris print server. The print command on the print client handles the local part of each print request by communicating directly with the print server.
The inetd process on the print server monitors network printing requests and starts a protocol adaptor to communicate with the lpsched daemon on the print server, which processes the print request.