Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpq(1) — Duplix 4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lpr(1)

lprm(1)

lpc(8)

lpd(8)

LPQ(1)  —  Unix Programmer’s Manual

NAME

lpq − spool queue examination program

SYNOPSIS

lpq [ options ] [ job# ...  ] [ user ...  ]

DESCRIPTION

Lpq examines the spooling area used by lpd(8) for printing files on the line printer and reports the status of the specified jobs or all jobs associated with a user. 

For each job submitted (each invocation of lpr(1)), lpq reports the user’s name, current rank in the queue, the names of files comprising the job, the job identifier (a number which may be supplied to lprm(1) for removing a specific job), and the total size in bytes.  Job ordering is dependent on the algorithm used to scan the spooling directory and is supposed to be FIFO (First In First Out).  If you or another user uses lpr(1) as a sink in a pipeline, lpq may not be able to discover the filenames in the queue.  In this case, lpq labels the file as “(standard input)". 

Without any arguments, lpq reports on any jobs currently in the queue. 

If lpq warns that there is no daemon present (i.e. due to some malfunction), you can use the lpc(8) command to restart the printer daemon. 

OPTIONS

+ Displays the spool queue until it empties. 

+n Displays the spool queue until it empties, but sleeps n seconds in between scans of the queue. 

−l Prints information about each of the files comprising the job.  Normally, only as much information as will fit on one line is displayed. 

−Pprinter
Specifies a particular printer.  Without this option, lpq checks the default line printer or the value of the PRINTER variable in the environment. 

All other arguments supplied are interpreted as user names or job numbers to filter out only those jobs of interest. 

FILES

/etc/termcapfor manipulating the screen for repeated display
/etc/printcapto determine printer characteristics
/usr/spool/∗the spooling directory, as determined from printcap
/usr/spool/∗/cf∗control files specifying jobs
/usr/spool/∗/lockthe lock file to obtain the currently active job

SEE ALSO

lpr(1), lprm(1), lpc(8), lpd(8)

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.  Sometimes this 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.

5 BSD  —  June 5, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026