Specifications

5-16
Guide to Printers and Printing
Testing the qdaemon
Submitting jobs to the spooler causes no discernible spooler activity. 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 a minute or so and re–issue the command ps –ef | grep qdaemon. Is the qdaemon
still active or did it start and then quit?
The qdaemon may no longer be active, despite the fact that you just restarted it and
received a message stating the qdaemons process id (PID). 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 quit 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
The qdaemon was inactive, you restarted it, it quit again, the file /var/spool/lpd/stat/pid
existed, and you removed that file. Restart the qdaemon again using the command
startsrc –s qdaemon. Wait a minute or so and issue the command ps –ef | grep qdaemon
again to see if the qdaemon remained active. You can also issue the command cat
/var/spool/lpd/stat/pid again to see if 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
the base operating system has a large number of printers (more than 25) 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 the lpstat command to see if any jobs have a status of RUNNING. If so, physically
examine the printers that show RUNNING jobs and verify that at least one job is actually
running. If one or more printers are showing DEV_WAIT because of paper jams or because