Mostrando postagens com marcador Printer. Mostrar todas as postagens
Mostrando postagens com marcador Printer. Mostrar todas as postagens

Remove / cancel printer jobs

quarta-feira, 24 de setembro de 2014

Here is a command to remove all jobs from a printer queue (you need root):
# cancel -e hplj32 


You can always list the jobs using lparstat (syntax lpstat queue_name) and then manually cancel just a single job using the command cancel followed by a job number.

Here I am requesting to cancel the hplj32-13 job
# cancel hplj32-13

Add a network printer queue

terça-feira, 3 de julho de 2012

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.

rresvport_af: socket: All ports in use (loop!)

terça-feira, 17 de abril de 2012

Follow the message showed when you try check a queue:

# lpstat QUEUE
rresvport_af: socket: All ports in use
err: rresvport_af()
/usr/sbin/rlpstat: Connection to QUEUE is down
no entries

Solution:

Check for "rpl" process running (will see a lot of them):

# ps -ef | grep rlp
root   1688   2345   0 08:24:40    ?      0:00 rlpdaemon -i


Use the "smh" to verify the type of that queue.

When the printer is a "remote" printer and it was created as a "network" printer, it will begin a loop causing problems to spooler. In this case is necessary remove the printer and create it again, you can create/remove it using hppi or by command line (addqueue/removequeu).
root   988   2345   0 08:24:40    ?      0:00 rlpdaemon -i

How to remove printer queue

segunda-feira, 9 de janeiro de 2012

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.

Moving printer jobs to another queue

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

Clean up spooler

domingo, 8 de janeiro de 2012

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