lpq doesn't need termcap any more
[unix-history] / usr / src / usr.sbin / lpr / lpq / lpq.1
CommitLineData
e23ccc70
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
e822e279 5.\" @(#)lpq.1 6.3 (Berkeley) %G%
e23ccc70 6.\"
c4901167 7.TH LPQ 1 ""
e23ccc70
KM
8.UC 5
9.SH NAME
10lpq \- spool queue examination program
11.SH SYNOPSIS
12.B lpq
13[ +[ n ] ] [ -l ] [ \-Pprinter ] [ job # ... ] [ user ... ]
14.SH DESCRIPTION
15.I lpq
16examines the spooling area used by
17.IR lpd (8)
18for printing
19files on the line printer, and reports the status of the specified jobs or
20all jobs associated with a user.
21.I lpq
22invoked without any arguments
23reports on any jobs currently in the queue. A
24.B \-P
25flag may be used
26to specify a particular printer, otherwise the default line printer
27is used (or the value of the PRINTER variable in the environment).
28If a
00f19af8 29.B \(pl
e23ccc70
KM
30argument is supplied,
31.I lpq
32displays the spool queue until it empties. Supplying a number
33immediately after the
00f19af8 34.B \(pl
e822e279
KB
35sign changes the number of seconds that \fIlpq\fP should sleep inbetween
36scans of the queue, from the default, 30, to \fIn\fP. All other arguments
37supplied are interpreted as user names or job numbers to filter out only
38those jobs of interest.
e23ccc70
KM
39.PP
40For each job submitted (i.e. invocation of
41.IR lpr (1))
42.I lpq
43reports the user's name, current rank in the queue, the
44names of files comprising the job, the job identifier (a number which
45may be supplied to
46.IR lprm (1)
47for removing a specific job), and the total size in bytes.
48The
49.B \-l
50option causes information about each of the files comprising the job
51to be printed.
52Normally, only as much information as will fit on one line is displayed.
53Job ordering is dependent on
54the algorithm used to scan the spooling directory and is supposed
55to be FIFO (First in First Out).
56File names comprising a job may be unavailable
57(when
58.IR lpr (1)
59is used as a sink in a pipeline) in which case the file
60is indicated as ``(standard input)".
61.PP
62If
63.I lpq
64warns that there is no daemon present (i.e. due to some malfunction),
65the
66.IR lpc (8)
67command can be used to restart the printer daemon.
68.SH FILES
69.nf
70.ta \w'/etc/termcap 'u
71/etc/termcap for manipulating the screen for repeated display
72/etc/printcap to determine printer characteristics
73/usr/spool/* the spooling directory, as determined from printcap
74/usr/spool/*/cf* control files specifying jobs
75/usr/spool/*/lock the lock file to obtain the currently active job
76.fi
77.SH "SEE ALSO"
78lpr(1),
79lprm(1),
80lpc(8),
81lpd(8)
82.SH BUGS
83Due to the dynamic nature of the information in the spooling directory
84lpq may report unreliably.
85Output formatting is sensitive to the line length of the terminal;
86this can results in widely spaced columns.
87.SH DIAGNOSTICS
88Unable to open various files. The lock file being malformed. Garbage
89files when there is no daemon active, but files in the spooling directory.