The lpstat command prints information about the current status of the LP print service. This is implemented as a front end to the LPRng lpq(1) program, and does not have the full functionality of the native lpstat program.
If no options are given, then lpstat prints the status of all the user's print requests made by lp on the default printer. (see lp(1) and lpr(1)). Any arguments that are not options are assumed to be request-IDs as returned by lp or printer names. The lpstat command prints the status of such requests. The options may appear in any order and may be repeated and intermixed with other arguments. Some of the keyletters below may be followed by an optional list that can be in one of two forms: a list of items separated from one another by a comma, or a list of items separated from one another by spaces enclosed in quotes. For example:
example% lpstat -u
Specifying all after any keyletter that takes list as an argument causes all information relevant to the keyletter to be printed. For example, the command:
example% lpstat -o all
prints the status of all output requests.
The omission of a list following such key letters causes all information relevant to the key letter to be printed. For example, the command:
example% lpstat -o
The following options are supported:
-A Use authentication specified by the value of the AUTH environment variable.
Reports whether print destinations are accepting requests. list is a list of printer names.
Print name of all classes and their members. list is a list of class names. (Same effect as -o.)
-d Print the system default destination for output requests.
Print list of printers supporting the specified forms option is ignored.
Print the status of output requests: list is a list of intermixed printer names, class names, and request-IDs. The keyletter -o may be omitted.
Print the status of printers. list is a list of printer names. (Same effect as -o.)
-P Print the paper types. Ignored.
-r Print the status of the LP request scheduler.
-R Print a number showing the position of each job in the print queue. Ignored.
-s Print a status summary. Produces a short status listing.
List or verify character sets of printers. (Ignored.)
-t Print all status information.
Print the status of output requests for users. (Same effect as -o.)
Print the path names of the printer output devices. (Ignored.) -D Combined with the -p flag prints description of printer.
The following exit values are returned:
The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values.