1*2abbc56aSabhinav.\" $NetBSD: lpq.1,v 1.16 2016/12/21 17:29:22 abhinav Exp $ 2e6a91a09Smrg.\" 3f881d1d4Scgd.\" Copyright (c) 1983, 1990, 1993 4f881d1d4Scgd.\" The Regents of the University of California. All rights reserved. 561f28255Scgd.\" 661f28255Scgd.\" Redistribution and use in source and binary forms, with or without 761f28255Scgd.\" modification, are permitted provided that the following conditions 861f28255Scgd.\" are met: 961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 1061f28255Scgd.\" notice, this list of conditions and the following disclaimer. 1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1261f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1361f28255Scgd.\" documentation and/or other materials provided with the distribution. 14326b2259Sagc.\" 3. Neither the name of the University nor the names of its contributors 1561f28255Scgd.\" may be used to endorse or promote products derived from this software 1661f28255Scgd.\" without specific prior written permission. 1761f28255Scgd.\" 1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2161f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2861f28255Scgd.\" SUCH DAMAGE. 2961f28255Scgd.\" 30e6a91a09Smrg.\" @(#)lpq.1 8.2 (Berkeley) 4/28/95 3161f28255Scgd.\" 32e6a91a09Smrg.Dd April 28, 1995 3361f28255Scgd.Dt LPQ 1 34d1407362Sgarbled.Os 3561f28255Scgd.Sh NAME 3661f28255Scgd.Nm lpq 3761f28255Scgd.Nd spool queue examination program 3861f28255Scgd.Sh SYNOPSIS 396051a9a3Swiz.Nm 40d77575d3Smycroft.Op Fl al 41d77575d3Smycroft.Op Fl P Ar printer 42a234ffc7Swiz.Op Fl w Ar maxwait 43d77575d3Smycroft.Op Ar job# ... 44d77575d3Smycroft.Op Ar user ... 4561f28255Scgd.Sh DESCRIPTION 46fe7ed7ceSmrg.Nm 4761f28255Scgdexamines the spooling area used by 4861f28255Scgd.Xr lpd 8 4961f28255Scgdfor printing files on the line printer, and reports the status of the 5061f28255Scgdspecified jobs or all jobs associated with a user. 51fe7ed7ceSmrg.Nm 5261f28255Scgdinvoked 5361f28255Scgdwithout any arguments reports on any jobs currently in the queue. 5461f28255Scgd.Pp 5561f28255ScgdOptions: 5661f28255Scgd.Bl -tag -width indent 5761f28255Scgd.It Fl P 5861f28255ScgdSpecify a particular printer, otherwise the default 5961f28255Scgdline printer is used (or the value of the 6061f28255Scgd.Ev PRINTER 6161f28255Scgdvariable in the 6261f28255Scgdenvironment). All other arguments supplied are interpreted as user 6361f28255Scgdnames or job numbers to filter out only those jobs of interest. 6461f28255Scgd.It Fl l 6561f28255ScgdInformation about each of the files comprising the job entry 6661f28255Scgdis printed. 6761f28255ScgdNormally, only as much information as will fit on one line is displayed. 68e6a91a09Smrg.It Fl a 69e6a91a09SmrgReport on the local queues for all printers, 70e6a91a09Smrgrather than just the specified printer. 71a234ffc7Swiz.It Fl w Ar maxwait 72a234ffc7SwizSpecify the maximum time to wait in seconds for remote responses. 73a234ffc7SwizThe default is 300 seconds or 5 minutes. 7461f28255Scgd.El 7561f28255Scgd.Pp 7661f28255ScgdFor each job submitted (i.e. invocation of 7761f28255Scgd.Xr lpr 1 ) 78fe7ed7ceSmrg.Nm 7961f28255Scgdreports the user's name, current rank in the queue, the 8061f28255Scgdnames of files comprising the job, the job identifier (a number which 8161f28255Scgdmay be supplied to 8261f28255Scgd.Xr lprm 1 8361f28255Scgdfor removing a specific job), and the total size in bytes. 8461f28255ScgdJob ordering is dependent on 8561f28255Scgdthe algorithm used to scan the spooling directory and is supposed 8661f28255Scgdto be 8761f28255Scgd.Tn FIFO 8861f28255Scgd(First in First Out). 8961f28255ScgdFile names comprising a job may be unavailable 9061f28255Scgd(when 9161f28255Scgd.Xr lpr 1 9261f28255Scgdis used as a sink in a pipeline) in which case the file 9361f28255Scgdis indicated as ``(standard input)''. 9461f28255Scgd.Pp 9561f28255ScgdIf 96fe7ed7ceSmrg.Nm 9761f28255Scgdwarns that there is no daemon present (i.e. due to some malfunction), 9861f28255Scgdthe 9961f28255Scgd.Xr lpc 8 10061f28255Scgdcommand can be used to restart the printer daemon. 10161f28255Scgd.Sh ENVIRONMENT 10261f28255ScgdIf the following environment variable exists, it is used by 103990562bfSwiz.Nm : 10461f28255Scgd.Bl -tag -width PRINTER 10561f28255Scgd.It Ev PRINTER 106ee6a5b2cSmouseSpecifies an alternative default printer. 10761f28255Scgd.El 10861f28255Scgd.Sh FILES 109afdf5dcfSjtc.Bl -tag -width /var/spool/output/*/lock -compact 11061f28255Scgd.It Pa /etc/printcap 11161f28255ScgdTo determine printer characteristics. 112afdf5dcfSjtc.It Pa /var/spool/output/* 11361f28255ScgdThe spooling directory, as determined from printcap. 114afdf5dcfSjtc.It Pa /var/spool/output/*/cf* 11561f28255ScgdControl files specifying jobs. 116afdf5dcfSjtc.It Pa /var/spool/output/*/lock 11761f28255ScgdThe lock file to obtain the currently active job. 11861f28255Scgd.El 1196051a9a3Swiz.Sh DIAGNOSTICS 1206051a9a3SwizUnable to open various files. The lock file being malformed. Garbage 1216051a9a3Swizfiles when there is no daemon active, but files in the spooling directory. 12261f28255Scgd.Sh SEE ALSO 12361f28255Scgd.Xr lpr 1 , 12461f28255Scgd.Xr lprm 1 , 12561f28255Scgd.Xr lpc 8 , 12661f28255Scgd.Xr lpd 8 12761f28255Scgd.Sh HISTORY 128fe7ed7ceSmrg.Nm 12961f28255Scgdappeared in 13061f28255Scgd.Bx 3 . 13161f28255Scgd.Sh BUGS 13261f28255ScgdDue to the dynamic nature of the information in the spooling directory 133fe7ed7ceSmrg.Nm 13461f28255Scgdmay report unreliably. 13561f28255ScgdOutput formatting is sensitive to the line length of the terminal; 136*2abbc56aSabhinavthis can result in widely spaced columns. 137