1830676 Members
2690 Online
110015 Solutions
New Discussion

lpsched

 
SOLVED
Go to solution
Jolene Mellas
Occasional Advisor

lpsched

I keep killing the lpsched process and removing the SCHEDLOCK file but the lpsched process now seems to lose connection with the printers because it stop printing right away put the lpsched process is running. When we try and delete a printer it starts up the lpsched process, and lpshut does not stop the lpsched process. There seems to be a disconnect. Any help greatly appreciated.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: lpsched

0) You didn't bother to identify your OS but the first thing to do is look for and install the latest lp cumulative patch.

1) Do an lpshut. Next, using ps -ef | grep lpsched see if any additional lpsched's are running. If so kill them. Next remove any SCSHEDLOCK, FIFO, and/or CLD_FIFO's. Next do a ps -ef | grep hpnpf and kill any of these. Finally, do an lpsched.

If it ain't broke, I can fix that.
D Block 2
Respected Contributor

Re: lpsched

are the jobs spooling or queueing into the printer spool directory ?
Golf is a Good Walk Spoiled, Mark Twain.
Bill Hassell
Honored Contributor

Re: lpsched

A little background on SysV printing: lpsched is both a daemon as well as a per-printjob parent. So there are normally several lpscheds running at the same time on a busy print server. To see this:

ps -fu lp

One and only one lpsched will have a parent ID of 1 (init). That's the first one started and if it's running, the spooler is running (lpstat -r). Each additional lpsched is associated with a printer script and monitors the printing task for a specific printer. To see the hierarchy, use this command line:

UNIX95= ps -Hfu lp

Now when a remote printer (or more typically, a remote print server) or the network have problems, the lpsched monitor can't do much to fix it. Usually, only a particular printer has problems, so start by cancelling the print job, then killing the lpsched that is pointing to this printer. That should elminate the lpsched plus any child processes.

Now lpshut sends a signal to all lpsched processes that are running but processes that are stuck in network communication problerms will hang and not terminate. Run lpshut followed by ps -fulp. If some lp processes won't terminate, use kill -9 on the lpsched processes and their child processes will terminate. Once ps -fulp shows nothing, then (and only then) is the spooler shutdown. Now you can use lpadmin (or SAM) to remove a printer.


Bill Hassell, sysadmin
Jolene Mellas
Occasional Advisor

Re: lpsched

Thank you very much for all the help. Yes..we needed to delete the FIFO file as well the SCHEDLOCK. This was not in any of our HP-UX documentation...so thanks again.