Operating System - HP-UX
1856326 Members
7183 Online
104111 Solutions
New Discussion

Re: lpsched / lpshut problem

 
Luca Frigatti
Contributor

lpsched / lpshut problem

Hi all!
I've the following problem..
I've stopped the print scheduler and, when I try to re-start it, I've the following error message :
lpsched:scheduler already running... and in this way the scheduler doesn't work.
I try to start the print scheduler using lpsched (and to stop it lpshut) and I try to start the print scheduler using SAM, too.

Is anydoby there that have any idea to solve this problem and re-start the scheduler in the correct way?
Thanks in advance for your help and your support.
Luca
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: lpsched / lpshut problem

After youve done an lpshut check there are no lp processes still running, if so kill them, then try to restart.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Dietmar Konermann
Honored Contributor

Re: lpsched / lpshut problem

Luca,

try to remove the /var/spool/lp/SCHEDLOCK file before running lpsched.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Fragon
Trusted Contributor

Re: lpsched / lpshut problem

Normally, when lpsched start,the system will generate a file called SCHEDLOCK in /var/spool/lp/. If the scheduler is shutdown regularly, the file SCHEDLOCK will be removed automatically.
If this file exists, lpsched can't be start! You must remove it manually.

-Gerald-
Bill Hassell
Honored Contributor

Re: lpsched / lpshut problem

Start with getting patches up to date. This will likely fix a lot of things. The correct way to stop lp is lpshut--but, always followup with lpstat -r to check and finally, ps -fulp to see if any processes owned by lp are still running.

lpshut sends a simple terminate signal to all the components (lpshed and children) so if a print process is hung up on I/O, the signal won't be seen. Make note of the printers mentioned in the hung lp jobs and then kill them, starting with kill -15, then kill -2 and then kill -1, and finally kill -9 (last resort) for each lp process left after lpshut.


Bill Hassell, sysadmin
Sean OB_1
Honored Contributor

Re: lpsched / lpshut problem

Issue the lpshut command, then do a ps -ef | grep lp to make sure no processes are running.

Then go to /var/spool/lp and check for a file called SCHEDLOCK.

If it's there remove it and issue the lpstart command.

MANOJ SRIVASTAVA
Honored Contributor

Re: lpsched / lpshut problem

Luca


Do a ps -ef | grep lp and kill the proceeses associated with the same.

cd /usr/spool/lp
rm FIFO
rm CHDLCK

then lpshced should do the trick



Manoj Srivastava
Sanjay_6
Honored Contributor

Re: lpsched / lpshut problem

Hi,

Once you have shutdown the scheduler, check if there is another lp process running. If there is another lpsched process, try shutting down the scheduler once again. If this does not work, kill the lpsched process. Then from the /usr/spool/lp directory delete the SCHEDLOCK and FIFO file and see if the lpstat still shown the scheduler as running. If not restart the scheduler.

/usr/lib/lpshut to shut the spooler
/usr/lib/lpsched to start the spooler.


Hope this helps.

Regds
Sean OB_1
Honored Contributor

Re: lpsched / lpshut problem

Luca,

Just a reminder to give points out to those who answered your questions. It only takes a moment, and helps make the forums more useful to everyone.

Sean