Understand basic printer troubleshooting

Author: name contact BSD flavour

Reviewer: name contact BSD flavour

Reviewer: name contact BSD flavour


Concept

Be able to view the print queue and manipulate the jobs within the queue. Be able to recognize the meaning of the first two fields in an /etc/printcap entry.

Introduction

Systems administration will invariably involve troubleshooting printers. The BSD spooling system consists of five programs and several files, the key pieces to this system are lpd - the line printer daemon, lpc - the administrative interface to the printing subsystem, lpr - adding jobs to a print queue, lpq - list print jobs in the queue, lprm - remove print jobs from the queue. The printer configuration file is /etc/printcap which describes all printers on the system.

The file printcap (((printing!printcap)))(((printcap))) is the printing capabilities database, which is a simplified version of the termcap(5) database used to describe printers.

The following shows an example printcap file:

""# Local Printer ""lp|local line printer:\ "" :lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:sh: "" ""# Remote Printer ""rp|remote line printer:\ "" :lp=:rm=printhost:rp=lp:sd=/var/spool/output:lf=/var/log/lpd-errs:

All lines in the printcap file that start with a # are comments. Individual items are separated by colons. The first field in the printcap database gives the printers names, which in the example above is lp for the local printer and rp for the remote printer. The remaining fields describe the printers characteristics, using name=value pairs, the name is a two character code. The most important ones in the example above, are, in alphabetic order:

""lf error log file pathname ""lo lock filename ""lp device special file ""rm machine name for remote printer ""rp remote printer name argument ""sd spooling directory ""sh suppress burst page - header page

Examples

Practice Exercises

More information

lpc(8), lpq(1), lprm(1), printcap(5)