xref: /original-bsd/usr.sbin/lpr/lpq/lpq.1 (revision 95a66346)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)lpq.1	6.9 (Berkeley) 03/14/91
7.\"
8.Vx
9.Vx
10.Dd
11.Dt LPQ 1
12.Os BSD 4.2
13.Sh NAME
14.Nm lpq
15.Nd spool queue examination program
16.Sh SYNOPSIS
17.Nm lpq
18.Op Fl l
19.Oo
20.Op Fl P Ar printer
21.Oo
22.Op  job # ...
23.Op  user ...
24.Sh DESCRIPTION
25.Nm Lpq
26examines the spooling area used by
27.Xr lpd  8
28for printing files on the line printer, and reports the status of the
29specified jobs or all jobs associated with a user.
30.Nm Lpq
31invoked
32without any arguments reports on any jobs currently in the queue.
33.Pp
34Options:
35.Pp
36.Tw Ds
37.Tp Fl P
38Specify a particular printer, otherwise the default
39line printer is used (or the value of the
40.Ev PRINTER
41variable in the
42environment). All other arguments supplied are interpreted as user
43names or job numbers to filter out only those jobs of interest.
44.Tp Fl l
45Information about each of the files comprising the job entry
46is printed.
47Normally, only as much information as will fit on one line is displayed.
48.Tp
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 FIFO (First in First Out).
61File names comprising a job may be unavailable
62(when
63.Xr lpr  1
64is used as a sink in a pipeline) in which case the file
65is indicated as ``(standard input)".
66.Pp
67If
68.Nm lpq
69warns that there is no daemon present (i.e. due to some malfunction),
70the
71.Xr lpc  8
72command can be used to restart the printer daemon.
73.Sh ENVIRONMENT
74If the following environment variable exists, it is used by
75.Nm lpq :
76.Tw Fl
77.Tp Ev PRINTER
78Specifies an alternate default printer.
79.Tp
80.Sh FILES
81.Dw /usr/share/misc/termcap
82.Di L
83.Dp Pa /usr/share/misc/termcap
84for manipulating the screen for repeated display
85.Dp Pa /etc/printcap
86to determine printer characteristics
87.Dp Pa /var/spool/*
88the spooling directory, as determined from printcap
89.Dp Pa /var/spool/*/cf*
90control files specifying jobs
91.Dp Pa /var/spool/*/lock
92the lock file to obtain the currently active job
93.Dp
94.Sh SEE ALSO
95.Xr lpr 1 ,
96.Xr lprm 1 ,
97.Xr lpc 8 ,
98.Xr lpd 8
99.Sh HISTORY
100.Nm Lpq
101appeared in 3 BSD.
102.Sh BUGS
103Due to the dynamic nature of the information in the spooling directory
104lpq may report unreliably.
105Output formatting is sensitive to the line length of the terminal;
106this can results in widely spaced columns.
107.Sh DIAGNOSTICS
108Unable to open various files.  The lock file being malformed.  Garbage
109files when there is no daemon active, but files in the spooling directory.
110