1lpstat(1) User Commands lpstat(1)
2
3
4
6 lpstat - print information about the status of the print service
7
9 lpstat [-d] [-r] [-R] [-s] [-t] [-a [list]] [-c [list]]
10 [-f [list]] [-o [list]] [-p [list] [-D]] [-S [list]]
11 [-u [login- ID -list]] [-v [list]] [-l level]
12
13
15 The lpstat utility displays information about the current status of the
16 LP print service to standard output.
17
18
19 If no options are given, lpstat prints the status of all the user's
20 print requests made by lp. See lp(1). Any arguments that are not
21 options are assumed to be request-IDs as returned by lp. The lpstat
22 command prints the status of such requests. options appears in any
23 order and can be repeated and intermixed with other arguments. Some key
24 letters can be followed by an optional list that can be in one of two
25 forms: a list of items separated from one another by a comma, or a list
26 of items separated from one another by spaces enclosed in quotes. For
27 example:
28
29 example% lpstat -u "user1 user2 user3"
30
31
32
33
34 Specifying all after any key letter that takes list as an argument
35 causes all information relevant to the key letter to be printed. For
36 example, the command:
37
38 example% lpstat -o all
39
40
41
42
43 prints the status of all output requests.
44
45
46 The omission of a list following such key letters causes all informa‐
47 tion relevant to the key letter to be printed. For example, the com‐
48 mand:
49
50 example% lpstat -o
51
52
53
54
55 prints the status of all output requests.
56
57
58 The print client commands locate destination information using the
59 "printers" database in the name service switch. See nsswitch.conf(4),
60 printers(4), and printers.conf(4) for details.
61
63 The following options are supported:
64
65 -a [list] Reports whether print destinations are accepting
66 requests. list is a list of intermixed printer
67 names and class names.
68
69 If the print queue is remote and IPP is in use,
70 the information provided is very close to that
71 reported for local queues. If the print queue is
72 remote and IPP is not in use (the print server is
73 older than Solaris 9, Update 6 or another
74 RFC-1179-based print service), this option does
75 not report any useful information.
76
77
78 -c [list] Prints name of all classes and their members.
79 list is a list of class names.
80
81 If the print queue is remote and IPP is in use,
82 the information provided is very close to that
83 reported for local queues. If the print queue is
84 remote and IPP is not in use (the print server is
85 older than Solaris 9, Update 6 or another
86 RFC-1179-based print service), this option does
87 not report any useful information.
88
89
90 -d Prints the default destination for output
91 requests.
92
93
94 -f[list] [-l] Prints a verification that the forms in list are
95 recognized by the LP print service. list is a
96 list of forms; the default is all. The -l option
97 lists the form descriptions.
98
99 If the print queue is remote and IPP is in use,
100 the information provided is very close to that
101 reported for local queues. If the print queue is
102 remote and IPP is not in use (the print server is
103 older than Solaris 9, Update 6 or another
104 RFC-1179-based print service), this option does
105 not report any useful information.
106
107
108 -l [level] Specifies the verbosity level for extended
109 reporting of printer or job objects (-o, -p, -r,
110 -u). Without this option, a level of 0 is used,
111 which reports summary information. When no level
112 is specified, a level of 1is used, which provides
113 more information about the object. A level of 2
114 or more enumerates all of the object's
115 attributes.
116
117 If the print queue is remote and IPP is in use,
118 the information provided is very close to that
119 reported for local queues. If the print queue is
120 remote and IPP is not in use (the print server is
121 older than Solaris 9, Update 6 or another
122 RFC-1179-based print service), this option does
123 not report any useful information.
124
125
126 -o [list] Prints the status of output requests. list is a
127 list of intermixed printer names, class names,
128 and request-IDs. The key letter -o can be omit‐
129 ted.
130
131 Specify printer and class names using atomic,
132 URI-style (scheme://endpoint), or POSIX-style
133 (server:destination) names. See printers.conf(4)
134 for more information.
135
136
137 -p [list] [-D] Prints the status of printers. list is a list of
138 printer names. If the -D option is given, a brief
139 description is printed for each printer in list.
140 If the -l option is given and the printer is on
141 the local machine, a full description of each
142 printer's configuration is returned, including
143 the form mounted, the acceptable content and
144 printer types, a printer description, and the
145 interface used.
146
147 If the print queue is remote and IPP is in use,
148 correct job id is reported. If the print queue is
149 remote and IPP is not in use (the print server is
150 older than Solaris 9, Update 6 or another
151 RFC-1179-based print service), -p [list] always
152 reports the first job in the queue irrespective
153 of its status.
154
155
156 -r Prints the status of the LP request scheduler.
157
158
159 -R Prints a number showing the position of each
160 request in the print queue.
161
162
163 -s Prints a status summary, including the status of
164 the LP scheduler, the default destination, a list
165 of printers and their associated devices, a list
166 of the machines sharing print services, a list of
167 all forms currently mounted, and a list of all
168 recognized character sets and print wheels.
169
170
171 -S [list] Prints a verification that the character sets or
172 the print wheels specified in list are recognized
173 by the LP print service. Items in list can be
174 character sets or print wheels; the default for
175 the list is all. If the -l option is given, each
176 line is appended by a list of printers that can
177 handle the print wheel or character set. The list
178 also shows whether the print wheel or character
179 set is mounted, or specifies the built-in charac‐
180 ter set into which it maps.
181
182 If the print queue is remote and IPP is in use,
183 the information provided is very close to that
184 reported for local queues. If the print queue is
185 remote and IPP is not in use (the print server is
186 older than Solaris 9, Update 6 or another
187 RFC-1179-based print service), this option does
188 not report any useful information.
189
190
191 -t Prints all status information. This includes all
192 the information obtained with the -s option, plus
193 the acceptance and idle/busy status of all print‐
194 ers.
195
196
197 -u [login-ID-list] Prints the status of output requests for users.
198 The login-ID-list argument can include any or all
199 of the following constructs:
200
201 login-ID a user on any system
202
203
204 system_name!login-ID a user on system sys‐
205 tem_name
206
207
208 system_name!all all users on system sys‐
209 tem_name
210
211
212 all!login-ID a user on all systems
213
214
215 all all users on all systems
216
217
218
219 -v [list] Prints the names of printers and the path names
220 of the devices associated with them or remote
221 system names for network printers. list is a list
222 of printer names.
223
224
226 The following exit values are returned:
227
228 0 Successful completion.
229
230
231 non-zero An error occurred.
232
233
235 /etc/printers.conf System printer configuration database
236
237
238 $HOME/.printers User-configurable printer database
239
240
241 ou=printers LDAP version of /etc/printers.conf
242
243
244 printers.conf.byname NIS version of /etc/printers.conf
245
246
247 printers.org_dir NIS+ version of /etc/printers.conf
248
249
251 See attributes(5) for descriptions of the following attributes:
252
253
254
255
256 ┌─────────────────────────────┬─────────────────────────────┐
257 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
258 ├─────────────────────────────┼─────────────────────────────┤
259 │Availability │SUNWlp-cmds │
260 ├─────────────────────────────┼─────────────────────────────┤
261 │Interface Stability │Standard │
262 └─────────────────────────────┴─────────────────────────────┘
263
265 cancel(1), lp(1), lpq(1B), lpr(1B), lprm(1B), nsswitch.conf(4), print‐
266 ers(4), printers.conf(4), attributes(5), standards(5)
267
269 For remote print queues, the BSD print protocol provides a very limited
270 set of information. The Internet Print Protocol (IPP) is preferred.
271
272
273 When IPP is in use, the user is prompted for a passphrase if the remote
274 print service is configured to require authentication.
275
276
277
278SunOS 5.11 3 Aug 2009 lpstat(1)