xref: /freebsd/usr.sbin/lpr/lpq/lpq.1 (revision c1bae21c1e10bdfe538f7e53343e2fcec46e6a45)
10b561052SJoerg Wunsch.\" Copyright (c) 1983, 1990, 1993
20b561052SJoerg Wunsch.\"	The Regents of the University of California.  All rights reserved.
30b561052SJoerg Wunsch.\"
40b561052SJoerg Wunsch.\" Redistribution and use in source and binary forms, with or without
50b561052SJoerg Wunsch.\" modification, are permitted provided that the following conditions
60b561052SJoerg Wunsch.\" are met:
70b561052SJoerg Wunsch.\" 1. Redistributions of source code must retain the above copyright
80b561052SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer.
90b561052SJoerg Wunsch.\" 2. Redistributions in binary form must reproduce the above copyright
100b561052SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer in the
110b561052SJoerg Wunsch.\"    documentation and/or other materials provided with the distribution.
120b561052SJoerg Wunsch.\" 3. All advertising materials mentioning features or use of this software
130b561052SJoerg Wunsch.\"    must display the following acknowledgement:
140b561052SJoerg Wunsch.\"	This product includes software developed by the University of
150b561052SJoerg Wunsch.\"	California, Berkeley and its contributors.
160b561052SJoerg Wunsch.\" 4. Neither the name of the University nor the names of its contributors
170b561052SJoerg Wunsch.\"    may be used to endorse or promote products derived from this software
180b561052SJoerg Wunsch.\"    without specific prior written permission.
190b561052SJoerg Wunsch.\"
200b561052SJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
210b561052SJoerg Wunsch.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
220b561052SJoerg Wunsch.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
230b561052SJoerg Wunsch.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
240b561052SJoerg Wunsch.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
250b561052SJoerg Wunsch.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
260b561052SJoerg Wunsch.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
270b561052SJoerg Wunsch.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
280b561052SJoerg Wunsch.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
290b561052SJoerg Wunsch.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
300b561052SJoerg Wunsch.\" SUCH DAMAGE.
310b561052SJoerg Wunsch.\"
320b561052SJoerg Wunsch.\"     @(#)lpq.1	8.2 (Berkeley) 4/28/95
330b561052SJoerg Wunsch.\"
340b561052SJoerg Wunsch.Dd April 28, 1995
350b561052SJoerg Wunsch.Dt LPQ 1
360b561052SJoerg Wunsch.Os BSD 4.2
370b561052SJoerg Wunsch.Sh NAME
380b561052SJoerg Wunsch.Nm lpq
390b561052SJoerg Wunsch.Nd spool queue examination program
400b561052SJoerg Wunsch.Sh SYNOPSIS
410b561052SJoerg Wunsch.Nm lpq
42c1bae21cSJoerg Wunsch.Op Fl a
430b561052SJoerg Wunsch.Op Fl l
440b561052SJoerg Wunsch.Op Fl P Ns Ar printer
450b561052SJoerg Wunsch.Op  job # ...
460b561052SJoerg Wunsch.Op  user ...
470b561052SJoerg Wunsch.Sh DESCRIPTION
480b561052SJoerg Wunsch.Nm Lpq
490b561052SJoerg Wunschexamines the spooling area used by
500b561052SJoerg Wunsch.Xr lpd  8
510b561052SJoerg Wunschfor printing files on the line printer, and reports the status of the
520b561052SJoerg Wunschspecified jobs or all jobs associated with a user.
530b561052SJoerg Wunsch.Nm Lpq
540b561052SJoerg Wunschinvoked
550b561052SJoerg Wunschwithout any arguments reports on any jobs currently in the queue.
560b561052SJoerg Wunsch.Pp
570b561052SJoerg WunschOptions:
580b561052SJoerg Wunsch.Pp
590b561052SJoerg Wunsch.Bl -tag -width indent
600b561052SJoerg Wunsch.It Fl P
610b561052SJoerg WunschSpecify a particular printer, otherwise the default
620b561052SJoerg Wunschline printer is used (or the value of the
630b561052SJoerg Wunsch.Ev PRINTER
640b561052SJoerg Wunschvariable in the
650b561052SJoerg Wunschenvironment). All other arguments supplied are interpreted as user
660b561052SJoerg Wunschnames or job numbers to filter out only those jobs of interest.
670b561052SJoerg Wunsch.It Fl l
680b561052SJoerg WunschInformation about each of the files comprising the job entry
690b561052SJoerg Wunschis printed.
700b561052SJoerg WunschNormally, only as much information as will fit on one line is displayed.
710b561052SJoerg Wunsch.It Fl a
720b561052SJoerg WunschReport on the local queues for all printers,
730b561052SJoerg Wunschrather than just the specified printer.
740b561052SJoerg Wunsch.El
750b561052SJoerg Wunsch.Pp
760b561052SJoerg WunschFor each job submitted (i.e. invocation of
770b561052SJoerg Wunsch.Xr lpr  1  )
780b561052SJoerg Wunsch.Nm lpq
790b561052SJoerg Wunschreports the user's name, current rank in the queue, the
800b561052SJoerg Wunschnames of files comprising the job, the job identifier (a number which
810b561052SJoerg Wunschmay be supplied to
820b561052SJoerg Wunsch.Xr lprm  1
830b561052SJoerg Wunschfor removing a specific job), and the total size in bytes.
840b561052SJoerg WunschJob ordering is dependent on
850b561052SJoerg Wunschthe algorithm used to scan the spooling directory and is supposed
860b561052SJoerg Wunschto be
870b561052SJoerg Wunsch.Tn FIFO
880b561052SJoerg Wunsch(First in First Out).
890b561052SJoerg WunschFile names comprising a job may be unavailable
900b561052SJoerg Wunsch(when
910b561052SJoerg Wunsch.Xr lpr  1
920b561052SJoerg Wunschis used as a sink in a pipeline) in which case the file
930b561052SJoerg Wunschis indicated as ``(standard input)''.
940b561052SJoerg Wunsch.Pp
950b561052SJoerg WunschIf
960b561052SJoerg Wunsch.Nm lpq
970b561052SJoerg Wunschwarns that there is no daemon present (i.e. due to some malfunction),
980b561052SJoerg Wunschthe
990b561052SJoerg Wunsch.Xr lpc  8
1000b561052SJoerg Wunschcommand can be used to restart the printer daemon.
1010b561052SJoerg Wunsch.Sh ENVIRONMENT
1020b561052SJoerg WunschIf the following environment variable exists, it is used by
1030b561052SJoerg Wunsch.Nm lpq :
1040b561052SJoerg Wunsch.Bl -tag -width PRINTER
1050b561052SJoerg Wunsch.It Ev PRINTER
1060b561052SJoerg WunschSpecifies an alternate default printer.
1070b561052SJoerg Wunsch.El
1080b561052SJoerg Wunsch.Sh FILES
1090b561052SJoerg Wunsch.Bl -tag -width "/var/spool/*/lock" -compact
1100b561052SJoerg Wunsch.It Pa /etc/printcap
1110b561052SJoerg WunschTo determine printer characteristics.
1120b561052SJoerg Wunsch.It Pa /var/spool/*
1130b561052SJoerg WunschThe spooling directory, as determined from printcap.
1140b561052SJoerg Wunsch.It Pa /var/spool/*/cf*
1150b561052SJoerg WunschControl files specifying jobs.
1160b561052SJoerg Wunsch.It Pa /var/spool/*/lock
1170b561052SJoerg WunschThe lock file to obtain the currently active job.
1180b561052SJoerg Wunsch.El
1190b561052SJoerg Wunsch.Sh SEE ALSO
1200b561052SJoerg Wunsch.Xr lpr 1 ,
1210b561052SJoerg Wunsch.Xr lprm 1 ,
1220b561052SJoerg Wunsch.Xr lpc 8 ,
1230b561052SJoerg Wunsch.Xr lpd 8
1240b561052SJoerg Wunsch.Sh HISTORY
1250b561052SJoerg Wunsch.Nm Lpq
1260b561052SJoerg Wunschappeared in
1270b561052SJoerg Wunsch.Bx 3 .
1280b561052SJoerg Wunsch.Sh BUGS
1290b561052SJoerg WunschDue to the dynamic nature of the information in the spooling directory
1300b561052SJoerg Wunsch.Nm lpq
1310b561052SJoerg Wunschmay report unreliably.
1320b561052SJoerg WunschOutput formatting is sensitive to the line length of the terminal;
1330b561052SJoerg Wunschthis can results in widely spaced columns.
1340b561052SJoerg Wunsch.Sh DIAGNOSTICS
1350b561052SJoerg WunschUnable to open various files.  The lock file being malformed.  Garbage
1360b561052SJoerg Wunschfiles when there is no daemon active, but files in the spooling directory.
137