lpq(1)lpq(1)Namelpq - spool queue examination program
Syntaxlpq [ options ] [ job #... ] [ user... ]
Description
The command examines the spooling area used by for printing files on
the printer, and reports the status of jobs. The command invoked with‐
out any arguments reports on any jobs currently in the default queue.
When jobs are being printed, reports the queue as being ``active''.
For each job submitted, reports the user's name, current rank in the
queue, the names of files comprising the job, the job identifier and
the total size in bytes. The job identifier is a number which may be
supplied to to remove a specific job.
Job ordering is determined by the FIFO (First In, First Out) algorithm
used to scan the spooling directory. When the queue is empty, reports
that there are ``no entries''.
File names may be unavailable for some jobs, for example, if the com‐
mand is used without specifying a file name, or if is used in a pipe
line. If file names are unavailable, the file name reported by is
``standard input''.
Arguments
job #... Causes to report on only the job number(s) specified.
user... Causes to report on only the jobs for the specified
user(s).
Options
+n Scan and display the spool queue until the queue is empty. The
queue is scanned every n seconds, if no argument is specified the
queue is scanned every 30 seconds.
-l Display the status of each job on more than one line if necessary.
If this option is not used, the status of each job is displayed on
one line.
-Pprinter
Report the status of the spool queue for the printer specified.
If this option is not used, the spool queue displayed is the one
defined by the PRINTER environment variable. If a queue is not
defined by the PRINTER environment variable, the spool queue dis‐
played is for the printer named ``lp'' in the file.
Restrictions
The displayed status of the spool queue may not always be the current
status. This is because jobs may be completed after the queue has been
examined, but before the status has been displayed.
Error Messages
Two of the most common error messages from are:
Warning: no daemon present ®
A daemon is not available for the specified printer. Refer to the com‐
mand to find out how to restart the printer daemon.
unknown printer ®
The printer specified as an argument to the -P option, doesn't have an
entry in the file.
Files
For manipulating the screen for repeated display
To determine printer characteristics
The spooling directory, as determined from printcap
Control files specifying jobs
The lock file to obtain the currently active job
See Alsolpr(1), lprm(1), lpc(8), lpd(8)lpq(1)