Operating System - HP-UX
1748060 Members
5365 Online
108758 Solutions
New Discussion юеВ

Re: lpsched has multiple session

 
Johnson Zhu
Advisor

lpsched has multiple session

I run ps -ef |grep lpsched on some systems found there are multisession on lpsched. Is it right? I have been told by HP engineer that lpsched should have only one session running at all. However I've been told by other HPUX expert saying that the multiple session is caused by the kernel setting. Does anyone have ideas why and how it is happening?

#ps -ef |grep lpsched
lp 21315 19903 0 Dec 12 ? 0:00 lpsched
lp 21467 19903 0 Dec 12 ? 0:00 lpsched
lp 19903 1 0 Dec 12 ? 2:43 lpsched
lp 21658 19903 0 Dec 12 ? 0:00 lpsched
lp 21377 19903 0 Dec 12 ? 0:00 lpsched
lp 21712 19903 0 Dec 12 ? 0:00 lpsched
root 3154 7197 0 22:33:31 pts/0 0:00 grep lpsched
lp 21294 19903 0 Dec 12 ? 0:00 lpsched
lp 21281 19903 0 Dec 12 ? 0:00 lpsched
lp 21382 19903 0 Dec 12 ? 0:00 lpsched
lp 21284 19903 0 Dec 12 ? 0:00 lpsched
lp 21280 19903 0 Dec 12 ? 0:00 lpsched
lp 21636 19903 0 Dec 12 ? 0:00 lpsched
2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: lpsched has multiple session

(I've asked the moderators to move this to HP-UX.)

You should redo to the ps(1):
UNIX95=EXTENDED_PS ps -HfC lpsched -x

Your output shows that the extra lpscheds are children of 19903. lpsched probably creates these children like sendmail, when working on something to print.
Bill Hassell
Honored Contributor

Re: lpsched has multiple session

> I have been told by HP engineer that lpsched should have only one session running at all.

Not true. If the spooler is stopped, then there will be no lpsched processes. When you start the spooler with lpsched, this process sees that it is the only one running and turns itself into a daemon running in the background. Then, each lp command will be processed by the first lpsched and another lpsched will become the monitor for the job, thus the first lpsched is the parent. Perfectly normal.

> However I've been told by other HPUX expert saying that the multiple session is caused by the kernel setting.

Completely wrong. One daemon plus zero to hundreds of lpsched children depending on how many printers you have that are currently printing. The following command will help explain what is happening:

UNIX95=1 ps -fHu lp

The -H will show the process hierarchy.

You may have one or several printers malfunctioning (paper jams, out of paper, powered off, etc) which will cause the lpscheds to wait (forever). You'll need to kill the lpscheds that are stuck on bad printers.


Bill Hassell, sysadmin