lpq(1) lpq(1)NAME lpq - queries the print spooler for progress information SYNOPSIS lpq [+[sleep-interval]] [-l] [-Pprinter] [jobno]... [user]... ARGUMENTS +[sleep-interval] Displays the spool queue until the last job has printed. If desired, you can replace sleep-interval with the number of seconds lpq should sleep between scans of the queue. jobno Limits the query to information about a specific job or several jobs. See the ``Examples'' section later in this manual page. -l Prints additional information about the file or files that have been sent to the print spooler as one print job. Normally, only as much information as fits on one line is displayed. Job ordering depends on the algorithm used to scan the spooling directory and is supposed to be FIFO (First In First Out). The filenames for a job may be unavailable when lpr is used as the last command in a pipeline, in which case the file is identified as standard input. -Pprinter Limits the query to information about jobs that are destined for a particular printer. If this option is not specified, the default line printer (or the value of the PRINTER variable in the environment) is used. user Limits the query to information about jobs that belong to the user or users specified. DESCRIPTION lpq responds to your queries about print jobs by examining particular files and directories that are used by lpd. The lpd program normally runs continuously in order to service print requests (see lpr(1)). By running lpq without any arguments, you can obtain a report describing all the print jobs currently in the queue. For each print job that remains to be done, lpq reports the user's name, the current rank in the queue, the names of files included in the job, the job identifier, and the total size in bytes. You can also supply the job number as an argument to lprm to remove a job before it is printed (see January 1992 1
lpq(1) lpq(1)lprm(1)). EXAMPLES In the following processing request, a job-specific query is made to see the status of job number 286. % lpq 286 cashew is ready and printing Rank Owner Job Files Total Size active root 286 /etc/passwd 742 bytes % | STATUS MESSAGES AND VALUES Beyond the normal information reported by lpq regarding the status of print jobs, certain error messages may also be provided. If lpq warns that no daemon is present because of some malfunction, you can use the lpc command to restart the printer daemon (see lpc(1M)). The lpq program may also report that it is unable to open various files. LIMITATIONS Because of the dynamic nature of the information in the spooling directory, lpq may not reliably report information concerning newly arriving or newly dispatched print jobs. Output formatting depends upon the line length of the terminal. The line length can result in widely spaced columns. FILES /etc/printcap File containing printer capabilities /etc/termcap File containing terminal capabilities /usr/spool/* Directory used by a variety of spooling utilities for configuration and data files /usr/spool/*/cf* Control files specifying jobs /usr/spool/*/lock Printer lock files SEE ALSO lpr(1), lprm(1) lpc(1M), lpd(1M) in A/UX System Administrator's Reference 2 January 1992