Understanding Print Queue Status

About this document
AIX printer status commands
AIX printer status field format
AIX printer status conditions
Remote queue status
Viewing only local queue status
Viewing the filenames in the status

About this document

This document discusses the methods of obtaining information from AIX queues and the information returned when getting queue status information. Special topics include how to avoid the wait when remote queues return delayed status and displaying file names with the status commands.

This document covers all levels of AIX.

AIX Printer status commands

The AIX status commands are shown below. For details see the man pages for each command.

AIX printer status field format

A typical, short (default) status will look like:

Queue   Dev   Status    Job Files              User         PP %   Blks  Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
asc     lp0   RUNNING   165 STDIN.20178        jwtesch       5 19    21   1   1
              QUEUED    167 STDIN.22612        root                  42   1   1
              QUEUED    169 STDIN.22644        root                  21   2   3
              QUEUED    170 /etc/motd          root@aix4p             1   1   4
Print Queue name.
Print Queue Device Name. If the Queue has multiple devices, they can be addressed individually as queue:device.
If this is a local queue, this will usually have the name of the special device file in the /dev directory, but there is really no linkage between the queue device and the /dev device except if specified in the FILE= parameter of the queue device.
Wise practice will limit queue device names to 5 characters.
This is the condition of the queue.
See AIX printer status conditions.
This is the Job number assigned by enq at AIX 4, or by the qdaemon at AIX 3. This number is determined by the next number in /var/spool/ldp/pio/stat/numfile. This is the job that you can cancel or set the priority for.
These are the file names of the files printing. STDIN indicates the data has been piped to the print command.
This is the name of the user who submitted the job. If the user is on a remote system, it will also try to identify the client name in this field using space available.
Pages Printed.
This is really not very valid. How it is actually used depends on the pipeline of backend programs. For piobe on local queues, this will be more of an indicater of pages counted during the formatting process for ASCII files only. This will have no meaning for PostScript or Passthrough queues.
Note: This will not accurately reflect the data that is in the output tray of the printer.
Percent of Job Printed. In most cases this will be an indication of the percent of the bytes in the file that have been sent to the Printer or Print Server. This may vary based on the backend, and once again shouldn't be used for performance monitoring or the like.
Number of thousand-byte blocks in the file. This factor is not determined by processing, but by a system call.
Number of Copies of the file to be printed. The number specified by the enq or qprt -N flag, the lpr -# flag, or the lp -n flag.
Rank or order of the print job on this queue. Number 1 will print first, 2 next and so on.

AIX Printer status conditions

The status conditions vary depending on the backend programs, but they are fairly standard for local queues. They are defined in:

The Defined status conditions are:

Queue is up. This queue has no jobs waiting to be printed and is ready to accept new jobs if qdaemon is running.
Queue is running a job; other jobs can be queued and will be printed when this job is done.
Queue could not open and is waiting on a device. The device may be out of paper, offline, jammed, or have wiring problems.
NEVER add, remove or change any queue when a queue on the same system is in a DEV_WAIT state without first correcting the problem.
Queue is down. The queue has been disabled with enq -D, or disable, or qadm -D. The queue will accept jobs, but they will not be run until the queue is reenabled with enq -U, enable, or qadm -U.
Driver is initializing. This is most often seen with PSF/6000 queues while the subsystem is coming up.
Data is being sent to a remote host either with rembak or a socket program such as piohpnpf (JetDirect) or the MarkNet software.
Queue is in the process of determining the foreign server.
Backend is in the process of establishing connections with a remote server.
The device that is to be used by the backend is busy printing another job for another queue, or is in a locked state.

Remote queue status

When obtaining the status of a remote queue, the status of both the local queue and the remote queue will be shown. This will usually give a status such as:

Queue   Dev   Status    Job Files              User         PP %   Blks  Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
gena    @tesc READY     <---- client queue gena, queue device @tesch
gena    genas DOWN      <---- server queue genasc, queue device lpx
              QUEUED    167 STDIN.22612        root                  42   1   1
              QUEUED    170 /etc/motd          root@aix4p             1   1   4
The exact format of the remote status will depend on the type of LPD running on the server as well as the stat filter setup in the client queue.

In the preceding case, The local (client) queue is empty and shows that the data has already been passed to the remote queue, which is down. The queue on the remote (server) system also has a job #167 that was sent locally on the server.

The Queue name for both lines of the status will show the client queue name as the name, but the Device will show the client device (usually the server name) for the local status line and the server queue name for the device name of the remote queue status line. Note: only five characters of the device name will display.

Viewing remote queue status with two queue devices

If the server has two queue devices for the queue, then you will see three lines in the status as follows:

#lpstat -vteschasc
Queue   Dev   Status    Job Files              User         PP %   Blks  Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---
teschas @tesc READY     <----  client queue teschasc:@tesch
teschas asc   READY     <----  server queue asc:lp0
asc     lpxt  READY     <----  server queue asc:lpxt
Note that the third line (the second queue device on the server queue) has the queue name of the server queue.

Viewing Only local queue status

One frequent problem encountered with remote queue status is the long wait for queues to time out if the remote server is down. Sometimes it is only important to check the status of the queues on the server. This can be done as follows:

Viewing the filenames in the status

To view filenames in the status, use the lpstat -t flag.
# lpstat -t -vasc
 Queue   Dev   Status    Job     Name           From           To            
                         Submitted        Rnk Pri       Blks  Cp          PP %
 ------- ----- --------- ---------        --- ---      ----- ---        ---- --
 asc     lp0   DEV_WAIT  785     STDIN.113993   jwtesch@alcatr jwtesch@alcatr
                        01/19/99 17:02:25    1  15          4   1               
               QUEUED    786     STDIN.30663    jwtesch@alcatr jwtesch@alcatr
                        01/19/99 17:02:48    2  15         36   1               

[ Doc Ref: 91885022111612     Publish Date: Mar. 29, 2001     4FAX Ref: 6502 ]