Checking the status of a print job (qchk command)

You can use the qchk command to check the status of a print job.

  • For local print jobs, the printer must be physically attached to your system or, in the case of a network printer, attached and configured on the network.
  • For remote print jobs, your system must be configured to communicate with the remote print server.
Use the qchk command to display the current status information regarding specified print jobs, print queues, or users.
The basic format of the qchk command is:
qchk -P QueueName -# JobNumber -u OwnerName
Note: The base operating system also supports the BSD UNIX check print queue command lpq and the System V UNIX check print queue command lpstat.
The following list contains examples of how to use the qchk command:
  • To display the default print queue, type:
    qchk -q
  • To display the long status of all queues until empty, while updating the screen every 5 seconds, type:
    qchk -A -L -w 5
  • To display the status for print queue lp0, type:
    qchk -P lp0
  • To display the status for job number 123, type:
    qchk -# 123
  • To check the status of all jobs in all queues, type:
    qchk -A

Print queue status conditions

Some of the status conditions that a print queue can have are:
DEV_BUSY
Indicates that:
  • More than one queue is defined to a printer device (lp0) and another queue is currently using the printer device.
  • qdaemon attempted to use the printer port device (lp0), but another application is currently using that printer device

To recover from a DEV_BUSY, wait until the queue or application has released the printer device, or cancel the job or process that is using the printer port.

DEV_WAIT
Indicates that the queue is waiting on the printer because the printer is offline, out of paper, jammed, or the cable is loose, bad, or wired incorrectly.

To recover from a DEV_WAIT, correct the problem that caused it to wait. It might be easier for diagnostic testing to use the enq command to move all queued jobs from the DEV_WAIT queue to another queue that is either printing or is DOWN. After the problem is corrected, you can move any unprinted job back to the original queue.

DOWN
A queue usually goes into a DOWN state after it has been in the DEV_WAIT state. This situation occurs when the printer device driver cannot tell if the printer is there because of absence of correct signaling. However, some printers might not have the capability to signal the queuing system that they are offline, and they instead send signals that they are off. If the printer device signals or appears to be off, the queue will go into the DOWN state.

To recover from a DOWN state, correct the problem that brought the queue down and have the system administrator bring the queue back up. The queue must be manually brought up before it can be used again.

HELD
Specifies that a print job is held. The print job cannot be processed by the spooler until it is released.
QUEUED
Specifies that a print file is queued and is waiting in line to be printed.
READY
Specifies that everything involved with the queue is ready to queue and print a job.
RUNNING
Specifies that a print file is printing.