11.6 Clearing and
Preventing Queue Hangs in AIX
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.
The previous procedure can be summarized as follows:
This is usually because of:
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.