1.\" Copyright (c) 1983, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. Neither the name of the University nor the names of its contributors 13.\" may be used to endorse or promote products derived from this software 14.\" without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26.\" SUCH DAMAGE. 27.\" 28.\" @(#)lpq.1 8.2 (Berkeley) 4/28/95 29.\" 30.Dd April 28, 1995 31.Dt LPQ 1 32.Os 33.Sh NAME 34.Nm lpq 35.Nd spool queue examination program 36.Sh SYNOPSIS 37.Nm 38.Op Fl a 39.Op Fl l 40.Op Fl P Ns Ar printer 41.Op job # ...\& 42.Op user ...\& 43.Sh DESCRIPTION 44The 45.Nm 46utility examines the spooling area used by 47.Xr lpd 8 48for printing files on the line printer, and reports the status of the 49specified jobs or all jobs associated with a user. 50The 51.Nm 52utility invoked 53without any arguments reports on any jobs currently in the queue. 54.Pp 55Options: 56.Bl -tag -width indent 57.It Fl P 58Specify a particular printer, otherwise the default 59line printer is used (or the value of the 60.Ev PRINTER 61variable in the 62environment). 63All other arguments supplied are interpreted as user 64names or job numbers to filter out only those jobs of interest. 65.It Fl l 66Information about each of the files comprising the job entry 67is printed. 68Normally, only as much information as will fit on one line is displayed. 69.It Fl a 70Report on the local queues for all printers, 71rather than just the specified printer. 72.El 73.Pp 74For each job submitted (i.e., invocation of 75.Xr lpr 1 ) 76.Nm 77reports the user's name, current rank in the queue, the 78names of files comprising the job, the job identifier (a number which 79may be supplied to 80.Xr lprm 1 81for removing a specific job), and the total size in bytes. 82Job ordering is dependent on 83the algorithm used to scan the spooling directory and is supposed 84to be 85.Tn FIFO 86(First in First Out). 87File names comprising a job may be unavailable 88(when 89.Xr lpr 1 90is used as a sink in a pipeline) in which case the file 91is indicated as ``(standard input)''. 92.Pp 93If 94.Nm 95warns that there is no daemon present (i.e., due to some malfunction), 96the 97.Xr lpc 8 98command can be used to restart the printer daemon. 99.Sh ENVIRONMENT 100If the following environment variable exists, it is used by 101.Nm : 102.Bl -tag -width PRINTER 103.It Ev PRINTER 104Specifies an alternate default printer. 105.El 106.Sh FILES 107.Bl -tag -width "/var/spool/*/lock" -compact 108.It Pa /etc/printcap 109To determine printer characteristics. 110.It Pa /var/spool/* 111The spooling directory, as determined from printcap. 112.It Pa /var/spool/*/cf* 113Control files specifying jobs. 114.It Pa /var/spool/*/lock 115The lock file to obtain the currently active job. 116.El 117.Sh DIAGNOSTICS 118Unable to open various files. 119The lock file being malformed. 120Garbage 121files when there is no daemon active, but files in the spooling directory. 122.Sh SEE ALSO 123.Xr lpr 1 , 124.Xr lprm 1 , 125.Xr lpc 8 , 126.Xr lpd 8 127.Sh HISTORY 128A 129.Nm 130utility appeared in 131.Bx 3 . 132.Sh BUGS 133Due to the dynamic nature of the information in the spooling directory 134.Nm 135may report unreliably. 136Output formatting is sensitive to the line length of the terminal; 137this can results in widely spaced columns. 138