In the AIX printing subsystem the file that defines queues is /etc/qconfig. This file is translated into a binary form called /etc/qconfig.bin. When the qdaemon is printing, this file is loaded into memory and used by the associated printing programs. When a change is made to /etc/qconfig, the current print jobs using the memory version of the file must complete printing before the new qconfig.bin can be loaded into memory for the new jobs to print. Thus, the current printing jobs must all finish before any jobs on the new or modified queue can print. When small jobs are printing, this is not a problem since the individual jobs finish quickly, and printing continues. But, when a large job is printing, or when a queue is in a DEV_WAIT state, all new or modified queues will appear hung until this condition is cleared and the printing finishes.
In order to correct a hung queue follow this procedure:
# lpstat Queue Dev Status Job Files User PP % Blks Cp Rnk ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- --- lpforu lp0 DEV_WAIT 5 /etc/hosts root 2 1 1 QUEUED 6 /etc/hosts root 2 1 2 QUEUED 7 /etc/hosts root 2 1 3 QUEUED 8 /etc/hosts root 2 1 4
# stopsrc -c -s qdaemon 0513-044 The stop of the qdaemon Subsystem was completed successfully.
# lssrc -s qdaemon Subsystem Group PID Status qdaemon spooler inoperative
For example, if the file is /var/spool/lpd/stat/p.lpforu.lp0, then run the following command:
cat /var/spool/lpd/stat/p.lpforu.lp0
This returns the value:
28080
Verifying that 28080 is the pid for the qd fork process, run:
# ps -ef|grep 28080 root 28080 35258 0 10:52:13 - 0:00 qd fork root 35720 28570 2 10:56:54 pts/3 0:00 grep 28080
To kill this process run the command:
kill -9 28080
To check if the process has stopped run:
# ps -ef | grep 28080 root 28084 28570 1 10:59:25 pts/3 0:00 grep 28080
Note |
---|
Some commands may require root user or system group authority. |
Once the system has been cleared, printer jams fixed, paper trays filled, and the queues show READY, the qdaemon can be restarted and the printing subsystem should be in working order again.
This is the time to add new queues. Make changes to the queue, and then start the qdaemon back up with:
startsrc -s qdaemon