Here is a command to remove all jobs from a printer queue (you need root):
# cancel -e hplj32
Here I am requesting to cancel the hplj32-13 job
Here is a command to remove all jobs from a printer queue (you need root):
# cancel -e hplj32
You can use the hppi "gui" to add a network printer or.. the adqueue command.
First of all check the model script available:
# /opt/hpnp/bin/addqueue -l
Create the queue using the appropriate model script:
# /opt/hpnp/bin/addqueue -h {printer IP} -q{printer name} -b off -i {printer model}
Do you need another HP model script?
http://www.hp.com/pond/modelscripts/index2.html
Check queue status:
lpstat {printer name}
Test the queue:
banner TEST | lp -d{printer name}
**Remembering..
1.. to do that is necessary the "jetdirect patch" installed on box.
2.. to create a local printer you have to use the lpadmin command (not the addqueue or hppi).
3.. for default the addqueue command isn't in root path.
Follow the message showed when you try check a queue:
Labels: Printer
Remove a non-network queue
Stop the spooler
# lpshut
Enable to reject new jobs
# reject PRINTER_QUEUE
Disable the queue
# disable PRINTER_QUEUE
Remove the queue
# lpdamin -xPRINTER_QUEUE
Start the spooler again
# lpsched
Using the "jetdirect" to remove a network queue
# removequeue -q PRINTER_QUEUE-f
You can use the "hppi" to remove network queues too.
Labels: Printer
To move just one job of a queue
# lpalt PRINTER1-1 PRINTER2
or do it the same using the lpmove command:
# lpmove PRINTER1-1 PRINTER2
To move all jobs of a queue
# lpmove printer1 printer2
Bring the scheduler down (even if it does not seem to be running)
# lpshut
If lpshut is working correctly, the files /var/spool/lp/FIFO and /var/spool/lp/SCHEDLOCK . If these files still exist, remove them.
# rm /var/spool/lp/FIFO
# rm /var/spool/lp/SCHEDLOCK
Clear the outputq file.
# > outputq
Kill any lpsched processes that may be reported by: ps -ef | grep lpsched
Restart the scheduler.
# lpsched
Verify that it is running:
# ps -ef | grep lpsched
Labels: Printer