< Previous | Contents | Next >
lpstat – Display Print System Status
The lpstat program is useful for determining the names and availability of printers on the system. For example, if we had a system with both a physical printer (named “printer”) and a PDF virtual printer (named “PDF”), we could check their status like this:
[me@linuxbox ~]$ lpstat -a
PDF accepting requests since Mon 08 Dec 2015 03:05:59 PM EST printer accepting requests since Tue 24 Feb 2016 08:43:22 AM EST
[me@linuxbox ~]$ lpstat -a
PDF accepting requests since Mon 08 Dec 2015 03:05:59 PM EST printer accepting requests since Tue 24 Feb 2016 08:43:22 AM EST
Further, we could determine a more detailed description of the print system configuration this way:
Monitoring And Controlling Print Jobs
[me@linuxbox ~]$ lpstat -s
system default destination: printer device for PDF: cups-pdf:/
device for printer: ipp://print-server:631/printers/printer
[me@linuxbox ~]$ lpstat -s
system default destination: printer device for PDF: cups-pdf:/
device for printer: ipp://print-server:631/printers/printer
In this example, we see that “printer” is the system’s default printer and that it is a net - work printer using Internet Printing Protocol (ipp://) attached to a system named “print- server”.
The commonly useful options include:
Table 22-5: Common lpstat Options
Option Description
Option Description
-a [printer...] Display the state of the printer queue for printer. Note that
this is the status of the printer queue’s ability to accept jobs, not the status of the physical printers. If no printers are specified, all print queues are shown.
-d Display the name of the system’s default printer.
-p [printer...] Display the status of the specified printer. If no printers
are specified, all printers are shown.
-r Display the status of the print server.
-s Display a status summary.
-t Display a complete status report.