To clear the queuing system, you must stop qdaemon and check if the /var file system is full. If so, use the following procedure to clear the queue directories and restart the qdaemon.
enq -x JobNumber
The lpstat command displays information about the current status of the line printer. The enq command enqueues a file.
stopsrc -s qdaemon
ps -ef | grep qdaemon
ps -ef | grep pio
The ps command shows the current status of processes. The grep command searches a file for a pattern.
If you get one line back from each of the above grep commands, skip step 5 and go to step 6. If you get more than one line, go to step 5.
kill -9 pid
The following example shows a qdaemon returned by ps -ef. The process ID is 3357.
root 3357 2288 0 13:32:21 - 0:04 dtterm
To kill this process ID, enter kill -9 3357 at the command line.
If your print job is queued in one of the following directories, make a copy of it, and place it in /tmp; you can print it when the queuing system is running again.
Note: In these directories, the files will have unfamiliar system names.
/var/spool/qdaemon /var/spool/lpd
Enter the df command and look in the %used column for/var to see if the file system is too full. Free space in the file system as necessary.
The df command displays information about total space and available space on a file system.
cd /var/spool/lpd/qdir
rm *
The pwd command writes to standard output the full path name of your current directory (from the root directory). The rm command removes the entries for the specified file or files from a directory.
cd /var/spool/lpd/stat
rm *
cd /var/spool/qdaemon
rm *
cd /var/spool/lpd
Issue a pwd to verify that you are in the proper directory. Then, remove all files in this directory using the rm command:
rm *
Note: The rm command will not remove the subdirectories.
startsrc -s qdaemon
The queuing system should start normally. If some queues are still down, bring them up by entering:
enable QueueName