Module 83 lpstat (SV)

Previous Table of Contents Next


Module 83
lpstat (SV)

DESCRIPTION

The external lpstat command returns status about the lp printer subsystem. To learn more about sending output to a printer refer to Module 79. To cancel output sent to a printer refer to Module 12. You can use lpstat to display information or status as follows :

Whether a printer accepts requests or is disabled

   Display classes of printers
   Display the system default printer
   Display all output requests
   Display the status of printers
   Display the status of the lp scheduler
   Display printers and devices
   Display all requests by user

COMMAND FORMAT

Following is the general format of the lpstat command.

 lpstat [ -drRst ] [ -a[list] ] [ -c[list] ] [ -f[list] [ -l ] \             [ -o[list] ] [ -p[list] [ -D ] [ -l ] ]             [ -S[list] [ -l ] ] [ -u[list] ] [ -v[list] ] 

The \ informs you to continue the line; no new-line is interpreted.

Options

The following list describes the options and their arguments that may be used to control how lpstat functions.

-d Displays the system default destination printer.
-r Displays the status of the lp scheduler daemon, lpsched .
-R Displays the position of the job in the print queue.
-s Displays a status summary: the system default destination printer, printer classes and their members , lpsched status, and a list of printers and their related devices. Same as using the -c -d -r -v options.
-t Displays all (total) status information. Although the information appears somewhat cluttered, it is in a standard format.
The first line informs you whether or not the spooling scheduler daemon is running.
The second line states the default printer.
The next set of lines maps the printer name to its hardware device name .
The next set informs you whether or not a printer is accepting print requests.
The next set displays the current state of the printer queue. The lj-419 request is printing on the lj printer, while the dp printer is idle.
The last set of information is the print queue.
-a[ list ] Displays the acceptance status of printers in the list. If a printer is accepting requests, it is enabled and ready to print. If a printer is not accepting jobs, it is disabled and not ready to print. The administrative commands enable and disable are used to change this state. The list may contain printers and classes of printers. If no list is given, all printers in all classes are displayed.
-c[ list ] Displays each printer class name and all printers that are members of each class. The list consists of class names . If no list is given, all printers in all classes are displayed.
-f[ list ] [-D] [-l] Verifies (by displaying) the list of forms exists. If list is not specified, the default is all. The -l option forces long descriptions for each form in the list.
-o[ list ] Displays the status of output printer requests. List contains class names, printer names, and request IDs. If no list is given, all requests for printers in all classes are displayed.
-p[ list ] [-D] [-l] Displays the status of each printer. List contains printer names. If no list is given, all printers are displayed.
-S[ list ] [-l] Verifies (by displaying) the list of character sets and print wheels specified in list are supported by the lp print service. The default for list is all. If the -l option is specified, a list of printers that can support the character set or print wheel follows each line.
-u[ list ] Displays the status for each user given in list. List contains login (user) names. If no list is given, only your requests are listed. Possible list formats are:
user_name a user on the local system
sys ! user_name a user on system sys
sys !all all users on system sys
all! user_name a user not on the local system
all!all all users not on the local system
all all users on the local system
-v[ list ] Displays the name of each printer and the pathname of the device where the printer is physically connected. The list contains printer names. If no list is given, all printers are displayed.

FURTHER DISCUSSION

The list s used in the options can be in one of two forms:

1.    A list of items separated by a comma (,) with no spaces around the comma.
2.    A list of items enclosed in double quotes separated by commas (,) and/or spaces.

For example, to list requests for users bill and yourself (mylogin), you would type:

 lpstat -u"bill mylogin" 

or

 lpstat -u"bill, mylogin" 

or

 lpstat -ubill,mylogin 


Previous Table of Contents Next

Copyright Wordware Publishing, Inc.


Illustrated UNIX System V
Illustrated Unix System V/Bsd
ISBN: 1556221878
EAN: 2147483647
Year: N/A
Pages: 144
Authors: Robert Felps

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net