]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/smm/07.lpd/2.t
Update to bmake-20200902
[FreeBSD/FreeBSD.git] / share / doc / smm / 07.lpd / 2.t
1 .\" Copyright (c) 1983, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)2.t 8.1 (Berkeley) 6/8/93
29 .\"
30 .NH 1
31 Commands
32 .NH 2
33 lpd \- line printer daemon
34 .PP
35 The program
36 .IR lpd (8),
37 usually invoked at boot time from the /etc/rc file, acts as
38 a master server for coordinating and controlling
39 the spooling queues configured in the printcap file.
40 When
41 .I lpd
42 is started it makes a single pass through the
43 .I printcap
44 database restarting any printers that have jobs.
45 In normal operation
46 .I lpd
47 listens for service requests on multiple sockets,
48 one in the UNIX domain (named ``/dev/printer'') for
49 local requests, and one in the Internet domain
50 (under the ``printer'' service specification)
51 for requests for printer access from off machine;
52 see \fIsocket\fP\|(2) and \fIservices\fP\|(5)
53 for more information on sockets and service
54 specifications, respectively.
55 .I Lpd
56 spawns a copy of itself to process the request; the master daemon
57 continues to listen for new requests.
58 .PP
59 Clients communicate with 
60 .I lpd
61 using a simple transaction oriented protocol.
62 Authentication of remote clients is done based
63 on the ``privilege port'' scheme employed by
64 \fIrshd\fP\|(8C) and \fIrcmd\fP\|(3X).
65 The following table shows the requests 
66 understood by
67 .IR lpd .
68 In each request the first byte indicates the
69 ``meaning'' of the request, followed by the name
70 of the printer to which it should be applied.  Additional
71 qualifiers may follow, depending on the request.
72 .DS
73 .TS
74 l l.
75 Request Interpretation
76 _
77 ^Aprinter\en    check the queue for jobs and print any found
78 ^Bprinter\en    receive and queue a job from another machine
79 ^Cprinter [users ...] [jobs ...]\en     return short list of current queue state
80 ^Dprinter [users ...] [jobs ...]\en     return long list of current queue state
81 ^Eprinter person [users ...] [jobs ...]\en      remove jobs from a queue
82 .TE
83 .DE
84 .PP
85 The \fIlpr\fP\|(1) command
86 is used by users to enter a print job in a local queue and to notify
87 the local
88 .I lpd
89 that there are new jobs in the spooling area.
90 .I Lpd
91 either schedules the job to be printed locally, or if
92 printing remotely, attempts to forward
93 the job to the appropriate machine.
94 If the printer cannot be opened or the destination
95 machine is unreachable, the job will remain queued until it is
96 possible to complete the work.
97 .NH 2
98 lpq \- show line printer queue
99 .PP
100 The \fIlpq\fP\|(1)
101 program works recursively backwards displaying the queue of the machine with
102 the printer and then the queue(s) of the machine(s) that lead to it.
103 .I Lpq
104 has two forms of output: in the default, short, format it
105 gives a single line of output per queued job; in the long 
106 format it shows the list of files, and their sizes, that
107 comprise a job.
108 .NH 2
109 lprm \- remove jobs from a queue
110 .PP
111 The \fIlprm\fP\|(1) command deletes jobs from a spooling
112 queue.  If necessary, \fIlprm\fP will first kill off a
113 running daemon that is servicing the queue and restart
114 it after the required files are removed.  When removing
115 jobs destined for a remote printer, \fIlprm\fP acts
116 similarly to \fIlpq\fP except it first checks locally
117 for jobs to remove and then
118 tries to remove files in queues off-machine.
119 .NH 2
120 lpc \- line printer control program
121 .PP
122 The
123 .IR lpc (8)
124 program is used by the system administrator to control the
125 operation of the line printer system.  
126 For each line printer configured in /etc/printcap,
127 .I lpc
128 may be used to:
129 .IP \(bu
130 disable or enable a printer,
131 .IP \(bu
132 disable or enable a printer's spooling queue,
133 .IP \(bu
134 rearrange the order of jobs in a spooling queue,
135 .IP \(bu
136 find the status of printers, and their associated
137 spooling queues and printer daemons.