I have written a perl script that can be used to quickly
reinitialize the print queues for the departmental network printers. It
first clears away all print jobs on all the queues and then reenables
them all.
As root you can run this as follows:
# /home/adm/fixprintqueues.pl
In addition I have this scheduled to run each day at 5:42AM which
should get each day started well.
Check the job status with lpstat, if there are no jobs printing then
just run fixprintqueues.pl
If something happens during the working day the fillowing commands
are useful:
# /usr/bin/lpstat -t # reports the state of all queues
# /usr/sbin/cupsenable <queuename> # starts the indicated queue
# /usr/sbin/cupsdisable <queuename> # stops the indicated queue
# ps | lp -d <quename> # send a one page test to the queue
After sending that test quickly do # tail -f /var/log/messages to observe whether or not it printed.
If it has not printed then it may be necessary to visit the printer.
In the past it was sometimes necessary to remove this samba file for
a queue.
First disable it.
Then remove the samba tlb file (i.e. "rm
/var/cache/samba/printing/<queuename>.tlb"
Then reenable it.
Bill Szkotnicki, 2008/March