Operating System - HP-UX
1832512 Members
4763 Online
110043 Solutions
New Discussion

Can i remove a printer when the scheduler is running?

 
SOLVED
Go to solution
rveri
Super Advisor

Can i remove a printer when the scheduler is running?

Hi All,

Few print jobs are running, And I want to remove a printer from the system.
# lpstat -i -o | grep on
shows 3 print jobs.


Hence ,can I remove it when the scheduler is running.

The printer is remote jetadmin printer.

Thanks,
6 REPLIES 6
Pete Randall
Outstanding Contributor
Solution

Re: Can i remove a printer when the scheduler is running?

For lp spooler printer the answer would be no:

root# lpadmin -xcrprt1
lpadmin: can't proceed - scheduler running

But, since it's a jetadmin printer, you can :

root# removequeue -f -q billsvc
billsvc deleted.


Pete

Pete
rveri
Super Advisor

Re: Can i remove a printer when the scheduler is running?

Pete ,

Thanks for quick reply.
Though it is a Jetadmin printer I used lpadmin , while adding it , and not addqueue.
Hope removequeue will work.

Thanks.
Raj D.
Honored Contributor

Re: Can i remove a printer when the scheduler is running?

Hi ,

You can do this with , removequeue.

# removequeue -q


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Can i remove a printer when the scheduler is running?


Yes, it can be deleted when scheduler is running.( for jetadmin printers)

# cd /opt/hpnpl/bin
# removequeue LP232
LP232 deleted


For details: # man removequeue.


hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
A. Clay Stephenson
Acclaimed Contributor

Re: Can i remove a printer when the scheduler is running?

You can run removequeue when the scheduler is running BUT, (AND THIS IS A VERY BIG BUT), to quote from the man page "when invoked, the removequeue programs stops the scheduler." --- so the real answer is that you must shutdown lpsched when adding or removing printers. The correct procedure is to execute the disable command and the reject command for this printer so that no further jobs will be accepted and no more files will be printed and then remove the printer when you are able to safely shutdown lpsched.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Can i remove a printer when the scheduler is running?

And to further amplify the difference between network (JetDirect) printers and other printers, lpdadmin knows NOTHING about JetDirect printers. It does have the ability to add a local (parallel or serial) printer and a remote (server, either Linux, Windows, etc or a LAN card with LPD capability) printer. Recent HP JetDirect cards have the (dumb) remote printer protocol built-in so using lpadmin to setup a remote printer will work but certainly not recommended.

So adding with lpadmin means you must remove the printer with lpadmin. The JetDirect software (hppi, jetadmin, removequeue, etc) will not work. As others have mentioned, the spooler must ALWAYS be stopped before removing (or adding or changing a printer. The Jetdirect software does this in the background without comment.

Using lpadmin to run an HP JetDirect printer LAN card means you have lost an immense amount of control options for your printer. Check the option available in: man net_ljx000. To add a JetDirect printer, use the command hppi.


Bill Hassell, sysadmin