Printer Configuration File
/etc/qconfig
Let’s talk about where the actual information is stored for the print queues and devices
Three directories reside under: /var/spool/lpd
/var/spool/lpd/qdir
When printing a file in AIX, a file is created in /var/spool/lpd/qdir that contains environment information of the user who sent the print job, as well as where to find what is being printed
Viewing the print queue
lpstat -W
lpstat -t
Note:- This information may look like garbage, but it can be very useful. An administrator can view this file and try to discern why a print job has failed by looking at the user’s environment, which is included in the file.
/var/spool/lpd/stat
This directory contains status information on the print devices. Each device will have a file in this directory. Unfortunately, the files are not in ASCII format, so there is little to view here, but it’s good to know where these files reside.
/var/spool/lpd/pio
This directory contains information on the back end that qdaemon uses. This is where the print queue typically reads and writes its back-end data.
Note:- The directory /var/spool/qdaemon is an important directory in the printing process on AIX. It contains a copy of the actual file being printed
Terminating a print job
There are several ways to terminate print jobs in AIX. You could use cancel, lprm, or qcan among many other commands. This article focuses on just cancel.
The command cancel is straightforward. You can specify either an individual print job number, a group of print job numbers, or the entire queue.
lpstat output
lpstat -W
Canceling a single print job
echo $PRINTER
cancel 1169
lpstat -W
This is good; the first print job was removed, but the queue is still down. Now, remove jobs 1171, 1173, and 1176. Listing 15 shows the code.
Canceling multiple print jobs
cancel 1171 1173 1176
lpstat -W
Canceling the entire print queue
cancel
lpstat -W
Disabling the print queue
lpstat -W
disable –c
lpstat -W
Enabling the print queue
lpstat -W
enable
lpstat -W
List print queues only
lsallq
List print queues, printers and description (good for checking if PostScript is used)
/usr/lib/lpd/pio/etc/piolsvp -p
List all print queues with status information
enq -AsW