[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Problem Solving Guide and Reference

Clear a Print Queue Backlog

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.

  1. Make sure you are logged in as root.
  2. 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 each job:
    enq -x JobNumber
    The lpstat command displays information about the current status of the line printer. The enq command enqueues a file.
  3. Issue the following command to stop qdaemon:
    stopsrc -s qdaemon
  4. Issue the following commands to verify that qdaemon did not fork other processes:
    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.

  5. 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.

    root 3357 2288 0 13:32:21 - 0:04 dtterm
    To kill this process ID, enter kill -9 3357 at the command line.
  6. 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.

    Note: In these directories, the files will have unfamiliar system names.
    /var/spool/qdaemon
    /var/spool/lpd
  7. 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.

  8. Change the directory as follows:
    cd /var/spool/lpd/qdir
  9. Issue a pwd command to verify that you are in the proper directory. Then, remove all files in this directory using the del command:
    del *  
    The pwd command writes to standard output the full path name of your current directory (from the root directory). The del command removes the entries for the specified file or files from a directory.
  10. Change the directory again:
    cd /var/spool/lpd/stat
  11. Issue a pwd command to verify that you are in the proper directory. Then, remove all files in this directory:
    del *  
  12. Change the directory again:
    cd /var/spool/qdaemon
  13. Issue a pwd command to verify that you are in the proper directory. Then, remove all files in this directory:
    del *
  14. Follow this step if you are having trouble with the remote queue or lpd. Change the directory:
    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 del command:
    del *
    Note: The del command will not remove the subdirectories.
  15. Start qdaemon:
    startsrc -s qdaemon

    The queuing system should start normally. If some queues are still down, bring them up by entering:

    enable QueueName

[ Previous | Next | Contents | Glossary | Home | Search ]