lpd

line printer spooler daemon

Syntax:

lpd [-l] [portnum]

Options:

-l
(``el'') Causes lpd to log valid requests received from the network. This can be useful for debugging purposes.
portnum
Although the Internet port number used to rendezvous with other processes is normally obtained with getservbyname(), you can use this option to change the port number.

Description:

The lpd daemon is typically started by the /etc/netstart file. The daemon makes a single pass through the printcap database, restarting any printers that have jobs. The daemon listens for requests to print files in the queue, transfer files to the spooling area, display the queue, or remove jobs from the queue. In each case, it forks a child to handle the request so the parent can continue to listen for more requests.

Access control is provided by two means. First, all requests must come from one of the machines listed in the file /etc/hosts.equiv or /etc/hosts.lpd. Second, if the rs capability is specified in the printcap entry for the printer being accessed, lpr requests will be honored only for those users with accounts on the machine with the printer.

The lpd daemon uses simple text files as lock files for synchronization. The parent daemon uses the file /usr/spool/output/lpd.lock, while its children use a .lock file within each spool directory specified in the printcap file.

The lock file is kept in a readable ASCII form and contains two lines. The first line is the pid of the daemon who owns the lock. The second line of the parent daemon's lock file contains its nid. The second line of the child's lock file contains the current job or status.

To keep a printer from filling your hard disk, a minfree file may be created in its spool directory. This file should contain the number of blocks (in ASCII) to leave free.

Files:

/etc/printcap
Printer description file.
/usr/spool/*
Spool directories.
/usr/spool/*/minfree
Minimum free space to leave.
/etc/hosts.equiv
Lists machine names allowed printer access.
/etc/hosts.lpd
Lists machine names allowed printer access, but not under same administrative control.

See also:

lpr, lprc, lprq, lprrm, /etc/printcap file, syslogd (QNX OS Utilities Reference)

Remote Printing Utilities chapter in this guide.