[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

qstatus Command

Purpose

Provides printer status for the print spooling system.

Syntax

qstatus [ -# JobNumber ] [ -A ] [ -L | -W ] [ -P Printer ] [ -e ] [ -q ] [ -u UserName ] [ -w DelaySeconds ]

Description

The qstatus command performs the actual status function for the print-spooling system. This command is never entered on the command line; it is called by the enq command. The qstatus command generates status information on specified jobs, printers, queues, or users.

The display generated by the qstatus command contains two entries for remote queues. The first entry contains the client's local queue and local device name and its status information. The second entry follows immediately; it contains the client's local queue name (again), followed by the remote queue name. Any jobs submitted to a remote queue are displayed first on the local side and are moved to the remote device as the job is processed on the remote machine.

Since the status commands communicate with remote machines, the status display may occasionally appear to hang while waiting for a response from the remote machine. The command will eventually time-out if a connection cannot be established between the two machines.

Flags

All flags are optional. If flags are not specified, the qstatus command returns the status of the following:

-# JobNumber Displays current status information for the job specified by the JobNumber variable. Normally, the status of all queued jobs is displayed.
  1. Specify the -P Queue to override the default destination printer.
  2. If jobs 1, 2, and 3 are in the printer queue, and you specify that you want the status of job 3 while job 1 is running, the status information will show job 1 and job 3, not only job 3.
  3. If you specify a job number that does not exist, the system displays the current job number on the queue instead of an error message.
-A Displays status information on all queues defined in the /etc/qconfig file.
-e Excludes status information from queues that are not under the control of the qdaemon command. The status from such queues may appear in different formats. The -e flag can be used with any combination of flags.
-L Displays a long, detailed version of status information as requested on the command line. This flag cannot be used with the -W flag. If the -L flag and the -W flag are used simultaneously, the first one specified takes precedence.
-P Printer Displays current status information for the printer specified by the Printer variable. Normally, the default printer is used, or the value of either the LPDEST or PRINTER environment variable is used. The LPDEST variable always takes precedence over the PRINTER variable.
-q Displays the current status of the default queue. The default queue is specified by the LPDEST variable, or if a LPDEST value does not exist, by the PRINTER environment variable. If neither variable exists, the qstatus command uses the first queue listed in the /etc/qconfig file.
-u UserName Displays current status information for all jobs submitted by the user specified by the UserName variable. Normally, the status of all queued jobs is displayed.
-W Displays a wide version of status information with longer queue names, device names, and job numbers. Longer job number information is available on AIX 4.3.2 and later. This flag cannot be used with the -L flag. If the -L flag and the -W flag are used simultaneously, the first one specified takes precedence.
-w DelaySeconds Displays requested queue information at intervals specified by the DelaySeconds variable. When the queue is empty, the display ends.

Examples

  1. To display the default print queue, enter:
    qstatus -q
  2. To display the long status of all queues until empty, while updating the screen every 5 seconds, enter:
    qstatus -A -L -w 5
  3. To display the status for printer lp0, enter:
    qstatus -P lp0
  4. To display the status for job number 123, enter:
    qstatus -# 123 -P lp0
  5. To display the status of all queues in wide format for AIX 4.2.1 or later, enter:
    qstatus -A -W

Files

/var/spool/lpd/qdir/* Contains the job description files.
/etc/qconfig Contains the configuration file.
/etc/qconfig.bin Contains the digested, binary version of the /etc/qconfig file.
/usr/lib/lpd/rembak
  Contains the remote back end.
/usr/lib/lpd/qstatus Contains the command file.
/var/spool/lpd/stat/* Contains the status files for the qstatus command.

Related Information

The enq command, lpd command, lpr command, qdaemon command, qchk command, rembak command.

The /etc/qconfig file.

Spooler Overview for System Management in the AIX 5L Version 5.2 Guide to Printers and Printing.

Remote Printing Overview in the AIX 5L Version 5.2 Guide to Printers and Printing.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]