Clearing a print queue backlog
If you need to clear a print queue backlog, you must stop qdaemon and check if the /var file system is full.
If the /var file system is full, use the following procedure to clear the queue directories and restart the qdaemon.
- If possible, let all current print jobs finish printing or cancel
them. To cancel a print job, issue the lpstat command to get the print job
number, then use the enq command to cancel the print job.
The lpstat command displays information about the current status of the line printer. The enq command enqueues a file.enq -x JobNumber
- Issue the following command to stop qdaemon:
stopsrc -s qdaemon
- Issue the following commands to verify that qdaemon did not fork other processes:
- If other qdaemons or
pios were returned by the ps -ef command, kill these processes
by issuing the following command with each process ID:
kill -9 pid
The following example shows a qdaemon returned by ps -ef. The process ID is 3357.
To kill this process ID, enter kill -9 3357 at the command line.root 3357 2288 0 13:32:21 - 0:04 dtterm
- Perform this step only if it is necessary to save the current print
jobs from being deleted. Otherwise, proceed to step 7.
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.
/var/spool/qdaemon /var/spool/lpd
Note: In these directories, the files will have unfamiliar system names. - If the /var file system gets too full, you
may experience problems with qdaemon or the spooler. Large
print jobs may fail, or 00root files with zero lengths
may appear in your qdir directory. Rebooting the system
in this case may not clear out the files or restart qdaemon.
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.
- Change the directory as follows:
cd /var/spool/lpd/qdir
- Issue a pwd command to verify that you are
in the proper directory. Then, remove all files in this directory using the rm command:
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.rm *
- Change the directory again:
cd /var/spool/lpd/stat
- Issue a pwd command to verify that you are in
the proper directory. Then, remove all files in this directory:
rm *
- Change the directory again:
cd /var/spool/qdaemon
- Issue a pwd command to verify that you are in
the proper directory. Then, remove all files in this directory:
rm *
- Follow this step if you are having trouble with the remote queue
or lpd. Change the directory:
Issue a pwd to verify that you are in the proper directory. Then, remove all files in this directory using the rm command:cd /var/spool/lpd
rm *
Note: The rm command will not remove the subdirectories. - Start qdaemon:
startsrc -s qdaemon
The queuing system should start normally. If some queues are still down, bring them up by entering:
enable QueueName