Operating System - HP-UX
1848365 Members
6239 Online
104024 Solutions
New Discussion

HPUX - LPSHUT =>Stop spooler without cancelling current printing job.

 
SOLVED
Go to solution
Eric Phenix
Occasional Contributor

HPUX - LPSHUT =>Stop spooler without cancelling current printing job.

Objectif: Try to install or modify a queue without cancelling all the current jobs of other queues.

Problem: Everytime I need to create a queue with lpadmin, I must shutdown the spooler with lpshut. Causing all the current printing jobs been cancel. When I restart it with lpsched all jobs cancel by lpshut are resubmit enterely.

Is there any hide option we can usewith lpsched, lpadmin or lpshut?
If it's not broke don't FIX it!!!
3 REPLIES 3
Bill Hassell
Honored Contributor

Re: HPUX - LPSHUT =>Stop spooler without cancelling current printing job.

Nope. This behavior is the design oh the SysV lp spooler. (Archaic isn't it? Especially when compared to a commercial quality spooler such as MPE on the HP 3000).

The only way to handle this is to perform lp spooler maintenance after hours or to disable all the printers in a script (waiting for current job to finish), then perform the changes and run lpsched.

The SysV spooler was designed in the days of greenbar paper and papertapes where a Unix computer with more than 5 printers was almost unknown.


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor

Re: HPUX - LPSHUT =>Stop spooler without cancelling current printing job.

Hi Eric,

What you can do is "reject" all the new print jobs. Then once all the print jobs are finished, shut the spooler and configure the printer. If you shut the spooler in the middle of a print job, it may start the print job from the begining when the spooler is started back.

Hope this helps.

Regds
Steve Steel
Honored Contributor
Solution

Re: HPUX - LPSHUT =>Stop spooler without cancelling current printing job.

Hi

If you disable your printers then the current jobs will finish and new jobs will go ot the queue but not be printed.

When all printing stops you can change your spooler and after the lpsched enable the printers again.

With this you can do it automatically.

#!/bin/ksh
#
#Printer parameter
#
# parameter is enable disable accept or reject to do all printers
#
option=$1
xx=`lpstat -p|grep printer|cut -f2 -d" "`
for printer in $xx
do
case $option in
accept) accept $printer ;;
reject) reject $printer ;;
enable) enable $printer ;;
disable) disable $printer ;;
*)echo invalid parameter ;;
esac
done


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)