LPQ(1) — UNIX Programmer’s Manual
NAME
lpq − spool queue examination program
SYNOPSIS
lpq [+[n]] [−Pprinter] [user ... ]
DESCRIPTION
lpq will examine the spooling area used by lpd(8) for printing files on the line printer, and report the status of all jobs associated with a user, or users. lpq invoked without any arguments will report on any jobs currently in the queue. A −P flag may be used to specify a particular printer, otherwise the default line printer is used (or the value of the PRINTER variable in the environment). If a + argument is supplied lpq will display the spool queue until it empties. Supplying a number immediately after the + sign indicates that lpq should sleep n seconds in between scans of the queue. Any other arguments supplied will be interpreted as user names and used to filter out only those jobs associated with the named users.
For each job submitted (i.e. invocation of lpr(1)) lpq reports the user’s name, current rank in the queue, the names of files comprising the job, and the job identifier (a number which may be supplied to lprm(1) for removing a specific job). Job ordering is dependent on the algorithm used to scan the spooling directory and is supposed to be FIFO (First in First Out). File names comprising a job may be unavailable (when lpr(1) is used as a sink in a pipeline) in which case the file is indicated as "(standard input)". The size of a file is reported in bytes.
FILES
/etc/passwd for user names
/etc/termcap for manipulating the screen for
repeated display
/etc/printcap to determine printer characteristics
/usr/spool/* the spooling directory, as determined
from printcap
/usr/spool/*/df* daemon files specifying a job
/usr/spool/*/lock the lock file to obtain the pid of
the currently active job
SEE ALSO
BUGS
Due to the dynamic nature of the information in the spooling directory lpq may report unreliably. Output formatting is sensitive to the line length of the terminal; this can results in widely spaced columns.
DIAGNOSTICS
Unable to open various files. The lock file being malformed. Garbage files when there is no daemon active, but files in the spooling directory.
7th Edition