AIX Printer Tips: 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
Queue
Print Queue name.
Dev
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.
Status
This is the condition of the queue.
See AIX Printer Status Conditions.
Job
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.
Files
These are the file names of the files printing. STDIN indicates the data has been piped to the print command.
User
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.
PP
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.
Blks
Number of thousand-byte blocks in the file. This factor is not determined by processing, but by a system call.
Cp
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.
Rnk
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:

READY
Queue is up. This queue has no jobs waiting to be printed and is ready to accept new jobs if qdaemon is running.
RUNNING
Queue is running a job; other jobs can be queued and will be printed when this job is done.
WAITING or DEV_WAIT
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.
OFF or DOWN
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.
INIT or INITIALIZE
Driver is initializing. This is most often seen with PSF/6000 queues while the subsystem is coming up.
SENDING
Data is being sent to a remote host either with rembak or a socket program such as piohpnpf (JetDirect) or the MarkNet software.
GETHOST
Queue is in the process of determining the foriegn server.
CONNECT
Backend is in the process of establishing connections with a remote server.
BUSY
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               
                               /var/spool/lpd/dfA184alcatraz                   
               QUEUED    786     STDIN.30663    jwtesch@alcatr jwtesch@alcatr
                        01/19/99 17:02:48    2  15         36   1               
                               /home/violet/scream.text

Understanding Print Queue Status: AIX Printer Tips: qstatus.html ITEM: FAX
Dated: 99/02/15~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:12
Comments or suggestions? Contact us