xref: /original-bsd/usr.sbin/lpr/lpq/lpq.1 (revision 00695d63)
1.\" Copyright (c) 1983, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)lpq.1	8.2 (Berkeley) 04/28/95
7.\"
8.Dd
9.Dt LPQ 1
10.Os BSD 4.2
11.Sh NAME
12.Nm lpq
13.Nd spool queue examination program
14.Sh SYNOPSIS
15.Nm lpq
16.OP Fl a
17.Op Fl l
18.Op Fl P Ns Ar printer
19.Op  job # ...
20.Op  user ...
21.Sh DESCRIPTION
22.Nm Lpq
23examines the spooling area used by
24.Xr lpd  8
25for printing files on the line printer, and reports the status of the
26specified jobs or all jobs associated with a user.
27.Nm Lpq
28invoked
29without any arguments reports on any jobs currently in the queue.
30.Pp
31Options:
32.Pp
33.Bl -tag -width indent
34.It Fl P
35Specify a particular printer, otherwise the default
36line printer is used (or the value of the
37.Ev PRINTER
38variable in the
39environment). All other arguments supplied are interpreted as user
40names or job numbers to filter out only those jobs of interest.
41.It Fl l
42Information about each of the files comprising the job entry
43is printed.
44Normally, only as much information as will fit on one line is displayed.
45.It Fl a
46Report on the local queues for all printers,
47rather than just the specified printer.
48.El
49.Pp
50For each job submitted (i.e. invocation of
51.Xr lpr  1  )
52.Nm lpq
53reports the user's name, current rank in the queue, the
54names of files comprising the job, the job identifier (a number which
55may be supplied to
56.Xr lprm  1
57for removing a specific job), and the total size in bytes.
58Job ordering is dependent on
59the algorithm used to scan the spooling directory and is supposed
60to be
61.Tn FIFO
62(First in First Out).
63File names comprising a job may be unavailable
64(when
65.Xr lpr  1
66is used as a sink in a pipeline) in which case the file
67is indicated as ``(standard input)''.
68.Pp
69If
70.Nm lpq
71warns that there is no daemon present (i.e. due to some malfunction),
72the
73.Xr lpc  8
74command can be used to restart the printer daemon.
75.Sh ENVIRONMENT
76If the following environment variable exists, it is used by
77.Nm lpq :
78.Bl -tag -width PRINTER
79.It Ev PRINTER
80Specifies an alternate default printer.
81.El
82.Sh FILES
83.Bl -tag -width "/var/spool/*/lock" -compact
84.It Pa /etc/printcap
85To determine printer characteristics.
86.It Pa /var/spool/*
87The spooling directory, as determined from printcap.
88.It Pa /var/spool/*/cf*
89Control files specifying jobs.
90.It Pa /var/spool/*/lock
91The lock file to obtain the currently active job.
92.El
93.Sh SEE ALSO
94.Xr lpr 1 ,
95.Xr lprm 1 ,
96.Xr lpc 8 ,
97.Xr lpd 8
98.Sh HISTORY
99.Nm Lpq
100appeared in
101.Bx 3 .
102.Sh BUGS
103Due to the dynamic nature of the information in the spooling directory
104.Nm lpq
105may report unreliably.
106Output formatting is sensitive to the line length of the terminal;
107this can results in widely spaced columns.
108.Sh DIAGNOSTICS
109Unable to open various files.  The lock file being malformed.  Garbage
110files when there is no daemon active, but files in the spooling directory.
111