11.6 Clearing and Preventing Queue Hangs in AIX

11.7 Flushing a Print Job

If you discovered that the first job you printed was the incorrect one, you printed the correct one but now want to delete the obsolete job. The following describes how to flush a print job.

Check the status of the print queue:

# lpstat -vlpforu
Queue  Dev  Status   Job  Files            User       PP %  Blks Cp Rnk
------ ---- -------- ---  ---------------- -------- ---- -- ---- -- ---
lpforu lp0  RUNNING       3  /etc/passwd      root        1 100   1  1   1

Print the /etc/hosts file to the default printer:

lpr -dlpforu /etc/hosts

Check the status of the print queue.

# lpstat -vlpforu
Queue  Dev  Status   Job  Files            User       PP %  Blks Cp Rnk
------ ---- -------- ---  ---------------- -------- ---- -- ---- -- ---
lpforu lp0  RUNNING    3  /etc/passwd      root        1 100   1  1   1
            QUEUED     4  /etc/hosts       root        1 100   2  1   2

Cancel the print job for /etc/passwd:

qcan -Plpforu -x3

Check the print queue using the qchk command:

# qchk -P lpforu
Queue  Dev  Status   Job  Files            User       PP %  Blks Cp Rnk
------ ---- -------- ---  ---------------- -------- ---- -- ---- -- ---
lpforu lp0  RUNNING    4  /etc/hosts       root        1 100   2  1   2

Another option for cancelling a print job is to use the cancel command with the job number, for example:

cancel 3

This will do the same as qcan -Plpforu -x3.

11.7.1 Summary

The previous procedure can be summarized as follows:

11.7.2 qdaemon Will Not Start

This is usually because of:

  1. Bad lines or stanzas in /etc/qconfig caused

  2. Incompatible qdaemon, enq, and digest after upgrade.

11.7.3 Cannot Add Printer Queue

If you attempt to add a new printer queue and receive the following error:

Not enough space in the /tmp directory

Since the /tmp file system is a mount point for a directory that contains system-generated temporary files, space will be required for those generated during the creation of the print queue. As such, these files cannot be written to /tmp and hence the previous error message. Troubleshoot this problem by increasing the size of /tmp or removing any unnecessary files in the /tmp.

11.8 Setting Default Printers