Content-type: text/html Man page of lpd

lpd

Section: Maintenance Commands (8)
Index Return to Main Contents
 

NAME

lpd - line printer daemon  

SYNOPSIS

/usr/lbin/lpd [-l]  

FLAGS

Causes the lpd daemon to log valid requests received from the network. This flag is useful for debugging.  

DESCRIPTION

The lpd line printer daemon (spool area handler) normally is invoked at boot time. The daemon makes a single pass through the printcap(4) file to determine the existing printers and to print all files that were not printed before the system shut down. The daemon uses system calls listen(2) and accept(2) to receive requests to print files in the queue, to transfer files to the spooling area, and to display the queue or remove jobs from the queue. In each case, the daemon forks a child process to handle the request so that the parent process can continue to listen for more requests. The Internet port number used to interact with other processes is identified with the getservbyname(3) system call and is specified in the /etc/services file by its printer service record entry.

Access control is provided by the following means:

All requests must originate from one of the machines listed in the /etc/hosts.equiv or /etc/hosts.lpd file.

When an rs capability, which restricts remote users to those with local accounts, is specified in the /etc/printcap file for the printer being accessed, an lpr or lp request is honored only for those users having accounts on the same machine as the printer.

The minfree ASCII file in each spool directory contains the number of disk blocks to leave free so that the line printer queue will not completely fill the disk.

The lock file in each /usr/spool subdirectory is used to prevent more than one active lpd daemon and to store information about the daemon process for other printer spooling commands.

After the lpd daemon has successfully set the lock in the lock file, it scans the /usr/spool subdirectory for files beginning with the characters cf. Records in each of the cf files specify files to be printed or specify one or more non-printing actions to be performed. Each such record begins with a key character that specifies what to do with the remainder of the line. In the following table, the columns list the beginning key character, the key-character name, and its purpose: Name of the machine where the lpr daemon or the lp command was invoked. Login name of the person who invoked the lpr or lp commands. This record is used to verify ownership by the lprm or cancel commands. String to be used for the job name on the burst page. String to be used for the classification line on the burst page. The record line provides identification information from the etc/passwd file and initiates banner page printing. The number of character spaces to indent the output (spacing is from the ASCII character set). Sends mail to the specified user when the current print job completes. Name of another font file to use in place of the default font file. Name of another font file to use in place of the default font file. Name of another font file to use in place of the default font file. Name of another font file to use in place of the default font file. Changes the page width (in characters) used by the pr command and by text filters. Selects the input tray that supplies paper for the print job. Selects the output tray where the printed paper is deposited. Specifies the orientation of the printed output on the page. Specifies whether the job should be printed on both sides of the physical sheet and whether the pages should be rotated by 180 degrees. String to be used as the title for the pr command. Name of an already formatted file to print. Name of a file to print using the pr command as a filter. Similar to f, but passes control characters and does not make page breaks. The file contains troff output (cat phototypesetter commands). The file contains DVI (device-independent) troff output. The file contains Tex(l) output (DVI format from Stanford). The file contains a raster image. The file contains data produced by the cifplot command. The file contains text data with Fortran carriage control characters. Do not interpret any control characters in the file. Name of file to remove on completion of printing. The name of the file undergoing printing, or when blank, for the standard input (when the lpr or lp command is invoked in a pipeline or when the command is invoked from the standard input).

Whenever a file cannot be opened for printing, a message is logged via the syslog(3) subroutine using the LOG_LPR facility. In this case, the lpd daemon tries to reopen a file, which it expects to be referenced by a correct pathname, up to 20 times. If a file cannot be opened after 20 tries, lpd goes to the next file.

The lpd daemon uses the flock(2) system call to provide exclusive access to the lock file and to prevent multiple daemons from being simultaneously activated. If the daemon is killed or dies unexpectedly, the lock file does not have to be removed.

The 2-line ASCII /usr/spool/lock file contains two lines. The first line specifies the process ID of the daemon, and the second line specifies the control file name of the job currently undergoing printing. The second line is updated to reflect the current status of the lpd daemon for commands lpq, lprm, cancel, and lpstat.  

FILES

Specifies the command path. Printer description file. Spool directories. The location of spool directories is a convention, but not necessary (see the /etc/printcap file). Minimum free disk space to leave. Line printer devices. Socket for local requests. Lists machine names allowed access to a printer. Lists machine names allowed access to a printer, but which are not under same administrative control.  

RELATED INFORMATION

Commands: cancel(1), lp(1), lpc(8), pac(8), lpr(1), lpq(1), lpstat(1), lprm(1)

Calls: syslog(3) delim off


 

Index

NAME
SYNOPSIS
FLAGS
DESCRIPTION
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:29 GMT, October 02, 2010