xref: /csrg-svn/usr.sbin/lpr/lpq/lpq.1 (revision 69010)
161845Sbostic.\" Copyright (c) 1983, 1990, 1993
261845Sbostic.\"	The Regents of the University of California.  All rights reserved.
319726Smckusick.\"
449513Scael.\" %sccs.include.redist.roff%
519726Smckusick.\"
6*69010Stef.\"     @(#)lpq.1	8.2 (Berkeley) 04/28/95
735749Sbostic.\"
844722Scael.Dd
944722Scael.Dt LPQ 1
1044722Scael.Os BSD 4.2
1144722Scael.Sh NAME
1244722Scael.Nm lpq
1344722Scael.Nd spool queue examination program
1444722Scael.Sh SYNOPSIS
1544722Scael.Nm lpq
16*69010Stef.OP Fl a
1744722Scael.Op Fl l
1849513Scael.Op Fl P Ns Ar printer
1944722Scael.Op  job # ...
2044722Scael.Op  user ...
2144722Scael.Sh DESCRIPTION
2244956Scael.Nm Lpq
2319726Smckusickexamines the spooling area used by
2444722Scael.Xr lpd  8
2530997Sbosticfor printing files on the line printer, and reports the status of the
2644722Scaelspecified jobs or all jobs associated with a user.
2744956Scael.Nm Lpq
2844722Scaelinvoked
2944722Scaelwithout any arguments reports on any jobs currently in the queue.
3044722Scael.Pp
3144722ScaelOptions:
3244722Scael.Pp
3349513Scael.Bl -tag -width indent
3449513Scael.It Fl P
3544722ScaelSpecify a particular printer, otherwise the default
3644722Scaelline printer is used (or the value of the
3744722Scael.Ev PRINTER
3844722Scaelvariable in the
3930997Sbosticenvironment). All other arguments supplied are interpreted as user
4030997Sbosticnames or job numbers to filter out only those jobs of interest.
4149513Scael.It Fl l
4244722ScaelInformation about each of the files comprising the job entry
4344722Scaelis printed.
4444722ScaelNormally, only as much information as will fit on one line is displayed.
45*69010Stef.It Fl a
46*69010StefReport on the local queues for all printers,
47*69010Stefrather than just the specified printer.
4849513Scael.El
4944722Scael.Pp
5044722ScaelFor each job submitted (i.e. invocation of
5144722Scael.Xr lpr  1  )
5244722Scael.Nm lpq
5319726Smckusickreports the user's name, current rank in the queue, the
5419726Smckusicknames of files comprising the job, the job identifier (a number which
5519726Smckusickmay be supplied to
5644722Scael.Xr lprm  1
5719726Smckusickfor removing a specific job), and the total size in bytes.
5819726SmckusickJob ordering is dependent on
5919726Smckusickthe algorithm used to scan the spooling directory and is supposed
6049513Scaelto be
6149513Scael.Tn FIFO
6249513Scael(First in First Out).
6319726SmckusickFile names comprising a job may be unavailable
6419726Smckusick(when
6544722Scael.Xr lpr  1
6619726Smckusickis used as a sink in a pipeline) in which case the file
6749513Scaelis indicated as ``(standard input)''.
6844722Scael.Pp
6919726SmckusickIf
7044722Scael.Nm lpq
7119726Smckusickwarns that there is no daemon present (i.e. due to some malfunction),
7219726Smckusickthe
7344722Scael.Xr lpc  8
7419726Smckusickcommand can be used to restart the printer daemon.
7544722Scael.Sh ENVIRONMENT
7644722ScaelIf the following environment variable exists, it is used by
7744722Scael.Nm lpq :
7849513Scael.Bl -tag -width PRINTER
7949513Scael.It Ev PRINTER
8044722ScaelSpecifies an alternate default printer.
8149513Scael.El
8244722Scael.Sh FILES
83*69010Stef.Bl -tag -width "/var/spool/*/lock" -compact
8449513Scael.It Pa /etc/printcap
8549513ScaelTo determine printer characteristics.
8649513Scael.It Pa /var/spool/*
8749513ScaelThe spooling directory, as determined from printcap.
8849513Scael.It Pa /var/spool/*/cf*
8949513ScaelControl files specifying jobs.
9049513Scael.It Pa /var/spool/*/lock
9149513ScaelThe lock file to obtain the currently active job.
9249513Scael.El
9344722Scael.Sh SEE ALSO
9444722Scael.Xr lpr 1 ,
9544722Scael.Xr lprm 1 ,
9644722Scael.Xr lpc 8 ,
9744722Scael.Xr lpd 8
9844722Scael.Sh HISTORY
9944956Scael.Nm Lpq
10049513Scaelappeared in
10149513Scael.Bx 3 .
10244722Scael.Sh BUGS
10319726SmckusickDue to the dynamic nature of the information in the spooling directory
10449513Scael.Nm lpq
10549513Scaelmay report unreliably.
10619726SmckusickOutput formatting is sensitive to the line length of the terminal;
10719726Smckusickthis can results in widely spaced columns.
10844722Scael.Sh DIAGNOSTICS
10919726SmckusickUnable to open various files.  The lock file being malformed.  Garbage
11019726Smckusickfiles when there is no daemon active, but files in the spooling directory.
111