Operating System - HP-UX
1826103 Members
4643 Online
109690 Solutions
New Discussion

Re: Problem in stopping Printer Scheduler

 
SOLVED
Go to solution
Shyam Sundar
Advisor

Problem in stopping Printer Scheduler

Hi,

In our HP9000 System running HP-UX 10.20, we are not able to stop the Printer Scheduler(lpshut). By giving lpshut, it comes out with "Scheduler Stopped", but acutally the scheduler is not terminating by giving this, lpstat still shows "Scheduler is Running".

For this issue we had rebooted the system once, by changing rc configuration LP=0. After reboot also the Scheduler is in running status.
.
We had configured network printers using Jetadmin in this system.

Could anyone help me out on this regard?

Thanks and Regards,
Shyam.
2 REPLIES 2
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Problem in stopping Printer Scheduler

Hi,

You are likely to have two lpsched lp schedulers running.

Execute the following to clear and restart the scheduler and force a removal of the lock and pipe after the kill:

# lpshut
# for i in `ps -fae|grep lpsched|grep -v grep|awk '{print $2}'`;do kill -HUP $i; kill -KILL $i; done
# rm -f /var/spool/lp/FIFO /var/spool/lp/SCHEDLOCK
# lpsched

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com

Bill Hassell
Honored Contributor

Re: Problem in stopping Printer Scheduler

For better reliability, I would try to avoid grep at all cost since grep will find processes like 2lpsched33 and user names like lpschedx and process arguments like: find /var -name lpsched, etc

Instead, ask ps to look for the process name explicitly:

Old:

for i in `ps -fae|grep lpsched|grep -v grep|awk '{print $2}'`;do kill -HUP $i; kill -KILL $i; done

New:
for i in $(UNIX95= ps -fC lpsched |awk '{print $2}');do kill -HUP $i; kill -KILL $i; done

Also, the use of backticks (grave accent, etc) is deprecated in POSIX man pages such as ksh and sh-posix. They are very easily misread as apostrophes or flyspecks on a fax, and some fonts make them impossible to decode.


Bill Hassell, sysadmin