version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
LPQ |
|
|
2 |
!!!LPQ |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
ENVIRONMENT |
|
|
7 |
PRINTER LISTS |
|
|
8 |
EXIT STATUS |
|
|
9 |
PRINTCAP INFORMATION |
|
|
10 |
FILES |
|
|
11 |
SEE ALSO |
|
|
12 |
DIAGNOSTICS |
|
|
13 |
HISTORY |
|
|
14 |
AUTHOR |
|
|
15 |
---- |
|
|
16 |
!!NAME |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
lpq - spool queue examination program |
|
|
20 |
!!SYNOPSIS |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
__lpq__ [[ __-a__ ] [[ __-A__ ] [[ __-l__ ] [[ |
|
|
24 |
__-L__ ] [[ __-P__ ''printer'' ] [[ __-s__ |
|
|
25 |
] |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
[[ __-t__ ''sleeptime'' ] [[ __-V__ ] [[ __-D__ |
|
|
29 |
''debugopt'' ] [[ ''jobid''... ] |
|
|
30 |
!!DESCRIPTION |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
''lpq'' requests a status report from lpd(8) on |
|
|
34 |
the specified printers or jobs. ''lpq'' invoked without |
|
|
35 |
any arguments reports on the printer given by the default |
|
|
36 |
printer (see __-P__ option). The short (default) format |
|
|
37 |
simply lists the printer, host, and numbers of jobs in the |
|
|
38 |
spool queue. When using the long format (-l option), for |
|
|
39 |
each job in a spool queue ''lpq'' reports the job |
|
|
40 |
identifier which is generated from the user's name and |
|
|
41 |
originating host, current rank in the queue, the job number |
|
|
42 |
(which may be supplied to lprm(1) for removing a |
|
|
43 |
specific job), the job description information, and the |
|
|
44 |
total size in bytes. If there is an error or other problem |
|
|
45 |
with the job, this information may be modified to reflect |
|
|
46 |
the problems. In a spool queue, Job ordering is a modified |
|
|
47 |
FIFO (First in First Out), modified by the job class and |
|
|
48 |
priority information. |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
The following options are available. |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
__-A__ |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
Use authentication specified by the value of the AUTH |
|
|
58 |
environment variable. |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__-D__''debugoptions'' |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
Debugging is controlled using the __-D__ option. This |
|
|
65 |
accepts a comma-separated list of debugging settings. These |
|
|
66 |
settings take one of two forms: __facility=value ,__ or |
|
|
67 |
__value__ to set an overall default value. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
__-P__ ''printer'' |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
By default, the destination printer is taken from the |
|
|
74 |
command line ''printer'' value, then the environment |
|
|
75 |
variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first |
|
|
76 |
entry in the printcap information, and and finally the |
|
|
77 |
default_printer entry from the configuration file, and then |
|
|
78 |
the compile time default. |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
__-V__ |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
Print version information. |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
__-a__ |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
List status for all printers (see PRINTER LISTS below) which |
|
|
91 |
have entries for the LPRng client programs in the |
|
|
92 |
printcap(5) database. |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
__-l__ |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
Increase verbosity of the __l__ong display format. A |
|
|
99 |
single -l options selects a short verbose display, multiple |
|
|
100 |
-l options increase the verbosity. |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
__-L__ |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
Use maximum verbosity for the __l__ong display |
|
|
107 |
format. |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
__-s__ |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
Display a short, single line status summary for each queue |
|
|
114 |
and subqueue. |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
__-t__''sleeptime'' |
|
|
118 |
|
|
|
119 |
|
|
|
120 |
Forces ''lpq'' to periodically display the spool queues |
|
|
121 |
and then sleep ''sleeptime'' seconds between scans of the |
|
|
122 |
queue. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
jobid ... all |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
The options are followed by a list of jobids which are used |
|
|
129 |
to select jobs of interest. A jobid can be a user name, a |
|
|
130 |
job identifier, a job number, or a glob based pattern which |
|
|
131 |
will be applied to the job identifiers. The all keyword will |
|
|
132 |
display all jobs and is the default option. |
|
|
133 |
|
|
|
134 |
|
|
|
135 |
The ''lpq'' will report the status of the spool queue |
|
|
136 |
(enabled for spooling, disabled for unspooling), and the |
|
|
137 |
absence of a server if unspooling is enabled. The |
|
|
138 |
lpc(1) command ''lpc start '' may |
|
|
139 |
be used to start the server if this is the |
|
|
140 |
case. |
|
|
141 |
!!ENVIRONMENT |
|
|
142 |
|
|
|
143 |
|
|
|
144 |
By default, the destination printer is taken from the |
|
|
145 |
command line ''dest'' value, then the environment |
|
|
146 |
variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first |
|
|
147 |
entry in the printcap information, and and finally the |
|
|
148 |
default_printer entry from the configuration file, and then |
|
|
149 |
the compile time default. |
|
|
150 |
!!PRINTER LISTS |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
The __-a__ option is used to by lpq(1) to get |
|
|
154 |
status for a list of printers. This list is formed as |
|
|
155 |
follows. |
|
|
156 |
|
|
|
157 |
|
|
|
158 |
1) |
|
|
159 |
|
|
|
160 |
|
|
|
161 |
The printcap file is scanned for printer entries. Only |
|
|
162 |
entries with names starting with a letter or digit are |
|
|
163 |
recognized as valid queue or printer names. |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
2) |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
If the special entry ''all'' is present, and it has a |
|
|
170 |
field '':all=pr1@host1,pr2@host2,...'' then the printers |
|
|
171 |
''pr1'', ''pr2'', ... are used as the printer or queue |
|
|
172 |
list. |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
3) |
|
|
176 |
|
|
|
177 |
|
|
|
178 |
If there is no all entry, then the original list of printers |
|
|
179 |
found in step 1) is used as the list of |
|
|
180 |
printers. |
|
|
181 |
|
|
|
182 |
|
|
|
183 |
The special case of __lpq -Pall__ disables the searching |
|
|
184 |
of the printcap database, and simply sends a query to the |
|
|
185 |
lpd server for status of printer __all__. The |
|
|
186 |
lpd(8) server enumerates the printers in its printcap |
|
|
187 |
file, ignoring any ''all'' entry, and returns status only |
|
|
188 |
for printers which have entries in the lpd(8) server |
|
|
189 |
printcap file. |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
Finally, the special case __lpq -Ppr@host__ causes |
|
|
193 |
lpq(1) to send a status request for printer __pr__ |
|
|
194 |
to host __host__. |
|
|
195 |
|
|
|
196 |
|
|
|
197 |
Here is a simple set of rules to use: |
|
|
198 |
|
|
|
199 |
|
|
|
200 |
Client: |
|
|
201 |
pr1:lp=%P@server |
|
|
202 |
pr2:lp=%P@server |
|
|
203 |
- printer pr1 followed by pr2 |
|
|
204 |
pr1:lp=%P@server |
|
|
205 |
pr2:lp=%P@server |
|
|
206 |
all:all=pr2,pr1 |
|
|
207 |
- printer pr2 followed by pr1 (all overrides) |
|
|
208 |
Client: |
|
|
209 |
pr1:lp=%P@server |
|
|
210 |
pr2:lp=%P@server |
|
|
211 |
Server: |
|
|
212 |
lp:lp=... |
|
|
213 |
lpq -Pall |
|
|
214 |
- status returned only for printer 'lp' |
|
|
215 |
!!EXIT STATUS |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
The following exit values are returned: |
|
|
219 |
|
|
|
220 |
|
|
|
221 |
__zero (0)__ |
|
|
222 |
|
|
|
223 |
|
|
|
224 |
Successful completion. |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
__non-zero (!=0)__ |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
An error occurred. |
|
|
231 |
!!PRINTCAP INFORMATION |
|
|
232 |
|
|
|
233 |
|
|
|
234 |
The printer names and other information is obtained by using |
|
|
235 |
a printcap file or some other database. The |
|
|
236 |
${HOME}/.printcap file can be used to specify user level |
|
|
237 |
options and configuration information. See printcap(5) for |
|
|
238 |
more information. |
|
|
239 |
!!FILES |
|
|
240 |
|
|
|
241 |
|
|
|
242 |
The files used by LPRng are set by values in the printer |
|
|
243 |
configuration file. The following are a commonly used set of |
|
|
244 |
default values. |
|
|
245 |
|
|
|
246 |
|
|
|
247 |
/etc/lprng/lpd.conf LPRng configuration file |
|
|
248 |
${HOME}/.printcap user printer description file |
|
|
249 |
/etc/lprng/printcap printer description file |
|
|
250 |
/etc/lprng/lpd.perms permissions |
|
|
251 |
/var/run/lprng/lpd lock file for queue control |
|
|
252 |
/var/spool/lpd spool directories |
|
|
253 |
/var/spool/lpd/QUEUE/control queue control |
|
|
254 |
/var/spool/lpd/QUEUE/log trace or debug log file |
|
|
255 |
/var/spool/lpd/QUEUE/acct accounting file |
|
|
256 |
/var/spool/lpd/QUEUE/status status file |
|
|
257 |
!!SEE ALSO |
|
|
258 |
|
|
|
259 |
|
|
|
260 |
lpd.conf(5), lpc(8), lpd(8), checkpc(8), lpr(1), lprm(1), |
|
|
261 |
printcap(5), lpd.perms(5), pr(1). |
|
|
262 |
!!DIAGNOSTICS |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
Most of the diagnostics are self explanatory. If you are |
|
|
266 |
puzzled over the exact cause of failure, set the debugging |
|
|
267 |
level on (-D5) and run again. The debugging information will |
|
|
268 |
help you to pinpoint the exact cause of |
|
|
269 |
failure. |
|
|
270 |
!!HISTORY |
|
|
271 |
|
|
|
272 |
|
|
|
273 |
LPRng is a enhanced printer spooler system with |
|
|
274 |
functionality similar to the Berkeley LPR software. The |
|
|
275 |
LPRng mailing list is lprng@lprng.com; subscribe by sending |
|
|
276 |
mail to lprng-request@lprng.com with the word subscribe in |
|
|
277 |
the body. The software is available from |
|
|
278 |
ftp://ftp.lprng.com/pub/LPRng. |
|
|
279 |
!!AUTHOR |
|
|
280 |
|
|
|
281 |
|
|
|
282 |
Patrick Powell |
|
|
283 |
---- |