xref: /freebsd/usr.sbin/lpr/lpq/lpq.1 (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1.\" Copyright (c) 1983, 1990, 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.Dd April 28, 1995
29.Dt LPQ 1
30.Os
31.Sh NAME
32.Nm lpq
33.Nd spool queue examination program
34.Sh SYNOPSIS
35.Nm
36.Op Fl a
37.Op Fl l
38.Op Fl P Ns Ar printer
39.Op job # ...\&
40.Op user ...\&
41.Sh DESCRIPTION
42The
43.Nm
44utility examines the spooling area used by
45.Xr lpd 8
46for printing files on the line printer, and reports the status of the
47specified jobs or all jobs associated with a user.
48The
49.Nm
50utility invoked
51without any arguments reports on any jobs currently in the queue.
52.Pp
53Options:
54.Bl -tag -width indent
55.It Fl P
56Specify a particular printer, otherwise the default
57line printer is used (or the value of the
58.Ev PRINTER
59variable in the
60environment).
61All other arguments supplied are interpreted as user
62names or job numbers to filter out only those jobs of interest.
63.It Fl l
64Information about each of the files comprising the job entry
65is printed.
66Normally, only as much information as will fit on one line is displayed.
67.It Fl a
68Report on the local queues for all printers,
69rather than just the specified printer.
70.El
71.Pp
72For each job submitted (i.e., invocation of
73.Xr lpr 1 )
74.Nm
75reports the user's name, current rank in the queue, the
76names of files comprising the job, the job identifier (a number which
77may be supplied to
78.Xr lprm 1
79for removing a specific job), and the total size in bytes.
80Job ordering is dependent on
81the algorithm used to scan the spooling directory and is supposed
82to be
83.Tn FIFO
84(First in First Out).
85File names comprising a job may be unavailable
86(when
87.Xr lpr 1
88is used as a sink in a pipeline) in which case the file
89is indicated as ``(standard input)''.
90.Pp
91If
92.Nm
93warns that there is no daemon present (i.e., due to some malfunction),
94the
95.Xr lpc 8
96command can be used to restart the printer daemon.
97.Sh ENVIRONMENT
98If the following environment variable exists, it is used by
99.Nm :
100.Bl -tag -width PRINTER
101.It Ev PRINTER
102Specifies an alternate default printer.
103.El
104.Sh FILES
105.Bl -tag -width "/var/spool/*/lock" -compact
106.It Pa /etc/printcap
107To determine printer characteristics.
108.It Pa /var/spool/*
109The spooling directory, as determined from printcap.
110.It Pa /var/spool/*/cf*
111Control files specifying jobs.
112.It Pa /var/spool/*/lock
113The lock file to obtain the currently active job.
114.El
115.Sh DIAGNOSTICS
116Unable to open various files.
117The lock file being malformed.
118Garbage
119files when there is no daemon active, but files in the spooling directory.
120.Sh SEE ALSO
121.Xr lpr 1 ,
122.Xr lprm 1 ,
123.Xr lpc 8 ,
124.Xr lpd 8
125.Sh HISTORY
126A
127.Nm
128utility appeared in
129.Bx 3 .
130.Sh BUGS
131Due to the dynamic nature of the information in the spooling directory
132.Nm
133may report unreliably.
134Output formatting is sensitive to the line length of the terminal;
135this can results in widely spaced columns.
136