User`s guide

5-10
Guide to Printers and Printing
Testing the qdaemon
Scenario: Submitting jobs to the spooler causes no discernible spooler activity; this is a
well–known scenario in Version 3.2.5. Assume a local ASCII print queue named asc.
Is the qdaemon running?
Issue the command enq –Pasc /etc/motd. If the qdaemon is not active, a variant of the
following message will be displayed:
enq: (WARNING): Cannot awaken qdaemon. (request accepted anyway)
enq: errno = 2: No such file or directory
enq: (WARNING): Cannot awaken qdaemon. (request accepted anyway)
enq: errno = 2: No such file or directory
Use the command ps –ef | grep qdaemon to verify that the qdaemon is not active. If the
qdaemon is not active, you should see, at the most, a line of output representing the grep
itself. It should look something like this:
root 2992 18792 0 12:46:39 pts/2 0:00 grep qdaemon
If the qdaemon is active, which it almost certainly will not be, you will see a variant of the
following line:
root 2980 3652 0 12:41:25 – 0:00 /usr/sbin/qdaemon
If the qdaemon is not active, issue the command startsrc –s qdaemon to restart the
qdaemon. If the qdaemon died, it should have been restarted automatically by the srcmstr
process, but it doesn’t always work, so restart it manually. You should see a variant of this
message:
0513–059 The qdaemon Subsystem has been started. Subsystem PID is
3000.
Wait one minute or so and re–issue the command ps –ef | grep qdaemon. Is the qdaemon
still active or did it just start and then die?
If the qdaemon is no longer active, despite the fact that you just restarted it and received a
message stating the qdaemons process id (PID) and that it was active, check for the
existence of the file named /var/spool/lpd/stat/pid. You can do this by issuing the
command cat /var/spool/lpd/stat/pid. This file contains the PID of an active qdaemon.
When the qdaemon is not active, the file is supposed to be removed.
If the cat command prints a number on your display, that should be the pid of an active
qdaemon. If you have already determined that the qdaemon is not active, remove the file
/var/spool/lpd/stat/pid because a previous instance of the qdaemon somehow died
without causing this file to be removed. If the file does not exist, you should see a message
like:
cat: cannot open /var/spool/lpd/stat/pid
If the qdaemon was inactive, you restarted it, it died again, the file /var/spool/lpd/stat/pid
existed, and you removed that file, then again restart the qdaemon using the command
startsrc –s qdaemon. Wait one minute or so and again issue the command ps –ef | grep
qdaemon to see if the qdaemon remained active. You can also again issue the command
cat /var/spool/lpd/stat/pid to see the file was re–created and now contains a valid PID.
If the answer to the original question, Is the qdaemon running?, was yes, it is, then it is
possible that the qdaemon is waiting on all currently running jobs to complete before it
shows any signs of accepting new jobs. This scenario often occurs when a machine running
AIX has a large number (greater than 25) of printers attached to asynchronous adapters,
such as 64–port or 128–port adapters.
To check to see if the qdaemon is waiting on a job to complete before it runs any more jobs,
use lpstat to see if any jobs have a status of RUNNING. If so, physically examine the