xref: /freebsd/usr.sbin/lpr/lpq/lpq.1 (revision 8a7b61203704d362cfbc66c00619f51b24106b55)
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.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
130b561052SJoerg Wunsch.\"    may be used to endorse or promote products derived from this software
140b561052SJoerg Wunsch.\"    without specific prior written permission.
150b561052SJoerg Wunsch.\"
160b561052SJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
170b561052SJoerg Wunsch.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
180b561052SJoerg Wunsch.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
190b561052SJoerg Wunsch.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
200b561052SJoerg Wunsch.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
210b561052SJoerg Wunsch.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
220b561052SJoerg Wunsch.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
230b561052SJoerg Wunsch.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
240b561052SJoerg Wunsch.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
250b561052SJoerg Wunsch.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
260b561052SJoerg Wunsch.\" SUCH DAMAGE.
270b561052SJoerg Wunsch.\"
280b561052SJoerg Wunsch.Dd April 28, 1995
290b561052SJoerg Wunsch.Dt LPQ 1
30a4c37c81SRuslan Ermilov.Os
310b561052SJoerg Wunsch.Sh NAME
320b561052SJoerg Wunsch.Nm lpq
330b561052SJoerg Wunsch.Nd spool queue examination program
340b561052SJoerg Wunsch.Sh SYNOPSIS
35e97407b4SRuslan Ermilov.Nm
36c1bae21cSJoerg Wunsch.Op Fl a
370b561052SJoerg Wunsch.Op Fl l
380b561052SJoerg Wunsch.Op Fl P Ns Ar printer
398b5c4af3SRuslan Ermilov.Op job # ...\&
408b5c4af3SRuslan Ermilov.Op user ...\&
410b561052SJoerg Wunsch.Sh DESCRIPTION
427f94b8deSPhilippe CharnierThe
437f94b8deSPhilippe Charnier.Nm
447f94b8deSPhilippe Charnierutility examines the spooling area used by
450b561052SJoerg Wunsch.Xr lpd 8
460b561052SJoerg Wunschfor printing files on the line printer, and reports the status of the
470b561052SJoerg Wunschspecified jobs or all jobs associated with a user.
487f94b8deSPhilippe CharnierThe
497f94b8deSPhilippe Charnier.Nm
507f94b8deSPhilippe Charnierutility invoked
510b561052SJoerg Wunschwithout any arguments reports on any jobs currently in the queue.
520b561052SJoerg Wunsch.Pp
530b561052SJoerg WunschOptions:
540b561052SJoerg Wunsch.Bl -tag -width indent
550b561052SJoerg Wunsch.It Fl P
560b561052SJoerg WunschSpecify a particular printer, otherwise the default
570b561052SJoerg Wunschline printer is used (or the value of the
580b561052SJoerg Wunsch.Ev PRINTER
590b561052SJoerg Wunschvariable in the
6007bfccd7SRuslan Ermilovenvironment).
6107bfccd7SRuslan ErmilovAll other arguments supplied are interpreted as user
620b561052SJoerg Wunschnames or job numbers to filter out only those jobs of interest.
630b561052SJoerg Wunsch.It Fl l
640b561052SJoerg WunschInformation about each of the files comprising the job entry
650b561052SJoerg Wunschis printed.
660b561052SJoerg WunschNormally, only as much information as will fit on one line is displayed.
670b561052SJoerg Wunsch.It Fl a
680b561052SJoerg WunschReport on the local queues for all printers,
690b561052SJoerg Wunschrather than just the specified printer.
700b561052SJoerg Wunsch.El
710b561052SJoerg Wunsch.Pp
7207bfccd7SRuslan ErmilovFor each job submitted (i.e., invocation of
730b561052SJoerg Wunsch.Xr lpr 1 )
749b3fe531SPhilippe Charnier.Nm
750b561052SJoerg Wunschreports the user's name, current rank in the queue, the
760b561052SJoerg Wunschnames of files comprising the job, the job identifier (a number which
770b561052SJoerg Wunschmay be supplied to
780b561052SJoerg Wunsch.Xr lprm 1
790b561052SJoerg Wunschfor removing a specific job), and the total size in bytes.
800b561052SJoerg WunschJob ordering is dependent on
810b561052SJoerg Wunschthe algorithm used to scan the spooling directory and is supposed
820b561052SJoerg Wunschto be
830b561052SJoerg Wunsch.Tn FIFO
840b561052SJoerg Wunsch(First in First Out).
850b561052SJoerg WunschFile names comprising a job may be unavailable
860b561052SJoerg Wunsch(when
870b561052SJoerg Wunsch.Xr lpr 1
880b561052SJoerg Wunschis used as a sink in a pipeline) in which case the file
890b561052SJoerg Wunschis indicated as ``(standard input)''.
900b561052SJoerg Wunsch.Pp
910b561052SJoerg WunschIf
929b3fe531SPhilippe Charnier.Nm
9307bfccd7SRuslan Ermilovwarns that there is no daemon present (i.e., due to some malfunction),
940b561052SJoerg Wunschthe
950b561052SJoerg Wunsch.Xr lpc 8
960b561052SJoerg Wunschcommand can be used to restart the printer daemon.
970b561052SJoerg Wunsch.Sh ENVIRONMENT
980b561052SJoerg WunschIf the following environment variable exists, it is used by
99e97407b4SRuslan Ermilov.Nm :
1000b561052SJoerg Wunsch.Bl -tag -width PRINTER
1010b561052SJoerg Wunsch.It Ev PRINTER
1020b561052SJoerg WunschSpecifies an alternate default printer.
1030b561052SJoerg Wunsch.El
1040b561052SJoerg Wunsch.Sh FILES
1050b561052SJoerg Wunsch.Bl -tag -width "/var/spool/*/lock" -compact
1060b561052SJoerg Wunsch.It Pa /etc/printcap
1070b561052SJoerg WunschTo determine printer characteristics.
1080b561052SJoerg Wunsch.It Pa /var/spool/*
1090b561052SJoerg WunschThe spooling directory, as determined from printcap.
1100b561052SJoerg Wunsch.It Pa /var/spool/*/cf*
1110b561052SJoerg WunschControl files specifying jobs.
1120b561052SJoerg Wunsch.It Pa /var/spool/*/lock
1130b561052SJoerg WunschThe lock file to obtain the currently active job.
1140b561052SJoerg Wunsch.El
11559a3c79dSRuslan Ermilov.Sh DIAGNOSTICS
11659a3c79dSRuslan ErmilovUnable to open various files.
11759a3c79dSRuslan ErmilovThe lock file being malformed.
11859a3c79dSRuslan ErmilovGarbage
11959a3c79dSRuslan Ermilovfiles when there is no daemon active, but files in the spooling directory.
1200b561052SJoerg Wunsch.Sh SEE ALSO
1210b561052SJoerg Wunsch.Xr lpr 1 ,
1220b561052SJoerg Wunsch.Xr lprm 1 ,
1230b561052SJoerg Wunsch.Xr lpc 8 ,
1240b561052SJoerg Wunsch.Xr lpd 8
1250b561052SJoerg Wunsch.Sh HISTORY
1267f94b8deSPhilippe CharnierA
1277f94b8deSPhilippe Charnier.Nm
1287f94b8deSPhilippe Charnierutility appeared in
1290b561052SJoerg Wunsch.Bx 3 .
1300b561052SJoerg Wunsch.Sh BUGS
1310b561052SJoerg WunschDue to the dynamic nature of the information in the spooling directory
1329b3fe531SPhilippe Charnier.Nm
1330b561052SJoerg Wunschmay report unreliably.
1340b561052SJoerg WunschOutput formatting is sensitive to the line length of the terminal;
1350b561052SJoerg Wunschthis can results in widely spaced columns.
136