Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
lpq(1)
Edit
PageHistory
Diff
Info
LikePages
LPQ !!!LPQ NAME SYNOPSIS DESCRIPTION ENVIRONMENT PRINTER LISTS EXIT STATUS PRINTCAP INFORMATION FILES SEE ALSO DIAGNOSTICS HISTORY AUTHOR ---- !!NAME lpq - spool queue examination program !!SYNOPSIS __lpq__ [[ __-a__ ] [[ __-A__ ] [[ __-l__ ] [[ __-L__ ] [[ __-P__ ''printer'' ] [[ __-s__ ] [[ __-t__ ''sleeptime'' ] [[ __-V__ ] [[ __-D__ ''debugopt'' ] [[ ''jobid''... ] !!DESCRIPTION ''lpq'' requests a status report from lpd(8) on the specified printers or jobs. ''lpq'' invoked without any arguments reports on the printer given by the default printer (see __-P__ option). The short (default) format simply lists the printer, host, and numbers of jobs in the spool queue. When using the long format (-l option), for each job in a spool queue ''lpq'' reports the job identifier which is generated from the user's name and originating host, current rank in the queue, the job number (which may be supplied to lprm(1) for removing a specific job), the job description information, and the total size in bytes. If there is an error or other problem with the job, this information may be modified to reflect the problems. In a spool queue, Job ordering is a modified FIFO (First in First Out), modified by the job class and priority information. The following options are available. __-A__ Use authentication specified by the value of the AUTH environment variable. __-D__''debugoptions'' Debugging is controlled using the __-D__ option. This accepts a comma-separated list of debugging settings. These settings take one of two forms: __facility=value ,__ or __value__ to set an overall default value. __-P__ ''printer'' By default, the destination printer is taken from the command line ''printer'' value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configuration file, and then the compile time default. __-V__ Print version information. __-a__ List status for all printers (see PRINTER LISTS below) which have entries for the LPRng client programs in the printcap(5) database. __-l__ Increase verbosity of the __l__ong display format. A single -l options selects a short verbose display, multiple -l options increase the verbosity. __-L__ Use maximum verbosity for the __l__ong display format. __-s__ Display a short, single line status summary for each queue and subqueue. __-t__''sleeptime'' Forces ''lpq'' to periodically display the spool queues and then sleep ''sleeptime'' seconds between scans of the queue. jobid ... all The options are followed by a list of jobids which are used to select jobs of interest. A jobid can be a user name, a job identifier, a job number, or a glob based pattern which will be applied to the job identifiers. The all keyword will display all jobs and is the default option. The ''lpq'' will report the status of the spool queue (enabled for spooling, disabled for unspooling), and the absence of a server if unspooling is enabled. The lpc(1) command ''lpc start '' may be used to start the server if this is the case. !!ENVIRONMENT By default, the destination printer is taken from the command line ''dest'' value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configuration file, and then the compile time default. !!PRINTER LISTS The __-a__ option is used to by lpq(1) to get status for a list of printers. This list is formed as follows. 1) The printcap file is scanned for printer entries. Only entries with names starting with a letter or digit are recognized as valid queue or printer names. 2) If the special entry ''all'' is present, and it has a field '':all=pr1@host1,pr2@host2,...'' then the printers ''pr1'', ''pr2'', ... are used as the printer or queue list. 3) If there is no all entry, then the original list of printers found in step 1) is used as the list of printers. The special case of __lpq -Pall__ disables the searching of the printcap database, and simply sends a query to the lpd server for status of printer __all__. The lpd(8) server enumerates the printers in its printcap file, ignoring any ''all'' entry, and returns status only for printers which have entries in the lpd(8) server printcap file. Finally, the special case __lpq -Ppr@host__ causes lpq(1) to send a status request for printer __pr__ to host __host__. Here is a simple set of rules to use: Client: pr1:lp=%P@server pr2:lp=%P@server - printer pr1 followed by pr2 pr1:lp=%P@server pr2:lp=%P@server all:all=pr2,pr1 - printer pr2 followed by pr1 (all overrides) Client: pr1:lp=%P@server pr2:lp=%P@server Server: lp:lp=... lpq -Pall - status returned only for printer 'lp' !!EXIT STATUS The following exit values are returned: __zero (0)__ Successful completion. __non-zero (!=0)__ An error occurred. !!PRINTCAP INFORMATION The printer names and other information is obtained by using a printcap file or some other database. The ${HOME}/.printcap file can be used to specify user level options and configuration information. See printcap(5) for more information. !!FILES The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values. /etc/lprng/lpd.conf LPRng configuration file ${HOME}/.printcap user printer description file /etc/lprng/printcap printer description file /etc/lprng/lpd.perms permissions /var/run/lprng/lpd lock file for queue control /var/spool/lpd spool directories /var/spool/lpd/QUEUE/control queue control /var/spool/lpd/QUEUE/log trace or debug log file /var/spool/lpd/QUEUE/acct accounting file /var/spool/lpd/QUEUE/status status file !!SEE ALSO lpd.conf(5), lpc(8), lpd(8), checkpc(8), lpr(1), lprm(1), printcap(5), lpd.perms(5), pr(1). !!DIAGNOSTICS Most of the diagnostics are self explanatory. If you are puzzled over the exact cause of failure, set the debugging level on (-D5) and run again. The debugging information will help you to pinpoint the exact cause of failure. !!HISTORY LPRng is a enhanced printer spooler system with functionality similar to the Berkeley LPR software. The LPRng mailing list is lprng@lprng.com; subscribe by sending mail to lprng-request@lprng.com with the word subscribe in the body. The software is available from ftp://ftp.lprng.com/pub/LPRng. !!AUTHOR Patrick Powell ----
18 pages link to
lpq(1)
:
lpbanner(1)
lpd(8)
lpr(1)
pclbanner(1)
psbanner(1)
Man1l
CUPS
cancel(1)
checkpc(8)
lp(1)
lpc(8)
lpd.perms(5)
lpf(1)
lprm(1)
lpstat(1)
monitor(1)
printcap(5)
lpd.conf(5)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.