|
|
1.1 root 1: .\" Copyright (c) 1983 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)lpd.8 6.3 (Berkeley) 12/8/85
6: .\"
7: .TH LPD 8 "December 8, 1985"
8: .UC 5
9: .ad
10: .SH NAME
11: lpd \- line printer daemon
12: .SH SYNOPSIS
13: .B /usr/lib/lpd
14: [
15: .B \-l
16: ] [ port # ]
17: .SH DESCRIPTION
18: .I Lpd
19: is the line printer daemon (spool area handler) and is normally invoked
20: at boot time from the
21: .IR rc (8)
22: file. It makes a single pass through the
23: .IR printcap (5)
24: file to find out about the existing printers and
25: prints any files left after a crash. It then uses the system calls
26: .IR listen (2)
27: and
28: .IR accept (2)
29: to receive requests to print files in the queue,
30: transfer files to the spooling area, display the queue,
31: or remove jobs from the queue. In each case, it forks a child to handle
32: the request so the parent can continue to listen for more requests.
33: The Internet port number used to rendezvous
34: with other processes is normally obtained with
35: .IR getservbyname (3)
36: but can be changed with the
37: .IR port #
38: argument.
39: The
40: .B \-l
41: flag causes
42: .I lpd
43: to log valid requests received from the network. This can be useful
44: for debugging purposes.
45: .PP
46: Access control is provided by two means. First, All requests must come from
47: one of the machines listed in the file
48: .I /etc/hosts.equiv
49: or
50: .IR /etc/hosts.lpd .
51: Second, if the ``rs'' capability is specified in the
52: .I printcap
53: entry for the printer being accessed,
54: .I lpr
55: requests will only be honored for those users with accounts on the
56: machine with the printer.
57: .PP
58: The file
59: .I minfree
60: in each spool directory contains the number of disk blocks to leave free
61: so that the line printer queue won't completely fill the disk.
62: The
63: .I minfree
64: file can be edited with your favorite text editor.
65: .PP
66: The file
67: .I lock
68: in each spool directory is used to prevent multiple daemons from
69: becoming active simultaneously, and to store information
70: about the daemon process for
71: .IR lpr (1),
72: .IR lpq (1),
73: and
74: .IR lprm (1).
75: After the daemon has successfully set the lock, it scans the directory
76: for files beginning with
77: .IR cf .
78: Lines in each
79: .I cf
80: file specify files to be printed or non-printing actions to be
81: performed. Each such line begins with a key character
82: to specify what to do with the remainder of the line.
83: .in +3
84: .IP J
85: Job Name. String to be used for the job name on the burst page.
86: .IP C
87: Classification. String to be used for the classification line
88: on the burst page.
89: .IP L
90: Literal. The line contains identification info from
91: the password file and causes the banner page to be printed.
92: .IP T
93: Title. String to be used as the title for
94: .IR pr (1).
95: .IP H
96: Host Name. Name of the machine where
97: .I lpr
98: was invoked.
99: .IP P
100: Person. Login name of the person who invoked
101: .IR lpr .
102: This is used to verify ownership by
103: .IR lprm .
104: .IP M
105: Send mail to the specified user when the current print job completes.
106: .IP f
107: Formatted File. Name of a file to print which is already formatted.
108: .IP l
109: Like ``f'' but passes control characters and does not make page breaks.
110: .IP p
111: Name of a file to print using
112: .IR pr (1)
113: as a filter.
114: .IP t
115: Troff File. The file contains
116: .IR troff (1)
117: output (cat phototypesetter commands).
118: .IP n
119: Ditroff File. The file contains device independent troff
120: output.
121: .IP d
122: DVI File. The file contains
123: .IR Tex (l)
124: output (DVI format from Standford).
125: .IP g
126: Graph File. The file contains data produced by
127: .IR plot (3X).
128: .IP c
129: Cifplot File. The file contains data produced by
130: .IR cifplot .
131: .IP v
132: The file contains a raster image.
133: .IP r
134: The file contains text data with FORTRAN carriage control characters.
135: .IP 1
136: Troff Font R. Name of the font file to use instead of the default.
137: .IP 2
138: Troff Font I. Name of the font file to use instead of the default.
139: .IP 3
140: Troff Font B. Name of the font file to use instead of the default.
141: .IP 4
142: Troff Font S. Name of the font file to use instead of the default.
143: .IP W
144: Width. Changes the page width (in characters) used by
145: .IR pr (1)
146: and the text filters.
147: .IP I
148: Indent. The number of characters to indent the output by (in ascii).
149: .IP U
150: Unlink. Name of file to remove upon completion of printing.
151: .IP N
152: File name. The name of the file which is being printed, or a blank
153: for the standard input (when
154: .I lpr
155: is invoked in a pipeline).
156: .in -5
157: .PP
158: If a file can not be opened, a message will be logged via
159: .IR syslog (3)
160: using the
161: .I LOG_LPR
162: facility.
163: .I Lpd
164: will try up to 20 times
165: to reopen a file it expects to be there, after which it will
166: skip the file to be printed.
167: .PP
168: .I Lpd
169: uses
170: .IR flock (2)
171: to provide exclusive access to the lock file and to prevent multiple
172: deamons from becoming active simultaneously. If the daemon should be killed
173: or die unexpectedly, the lock file need not be removed.
174: The lock file is kept in a readable ASCII form
175: and contains two lines.
176: The first is the process id of the daemon and the second is the control
177: file name of the current job being printed. The second line is updated to
178: reflect the current status of
179: .I lpd
180: for the programs
181: .IR lpq (1)
182: and
183: .IR lprm (1).
184: .SH FILES
185: .nf
186: .ta \w'/etc/printcap 'u
187: /etc/printcap printer description file
188: /usr/spool/* spool directories
189: /usr/spool/*/minfree minimum free space to leave
190: /dev/lp* line printer devices
191: /dev/printer socket for local requests
192: /etc/hosts.equiv lists machine names allowed printer access
193: /etc/hosts.lpd lists machine names allowed printer access,
194: but not under same administrative control.
195: .fi
196: .SH "SEE ALSO"
197: lpc(8),
198: pac(1),
199: lpr(1),
200: lpq(1),
201: lprm(1),
202: syslog(3),
203: printcap(5)
204: .br
205: .ul
206: 4.2BSD Line Printer Spooler Manual
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.