Operating System - HP-UX
1838604 Members
2936 Online
110128 Solutions
New Discussion

2 inetd processes 100% cpu??

 
AIMC
Frequent Advisor

2 inetd processes 100% cpu??

Hi,

We had an issue recently where the system was running extremely slow, checked top & inetd was running twice with one of the processes taking 100% cpu! I cannot find out why this happened & cannot seem to recreate it on a test server, when i try to start inetd & its already running i get the following;

# /sbin/init.d/inetd start
An inetd is already running
Usage: inetd [-l]
inetd -c
inetd -k
inetd -b
Unable to start Internet Services

Can anybody explain how 2 inetd processes could have started?
When 2 inetd processes are running is there a conflict between them that causes 100% cpu usage?


Regards,

Aidan
7 REPLIES 7
RAC_1
Honored Contributor

Re: 2 inetd processes 100% cpu??

Stop all and then start one. Also check patches.
There is no substitute to HARDWORK
Patrick Wallek
Honored Contributor

Re: 2 inetd processes 100% cpu??

Were they both independent processes? Or was one inetd a child of the other?

I agree that your best bet probably would be to do an '/sbin/init.d/inetd stop' to stop them. If they both don't die, then kill the leftover one. After that, restart with '/sbin/init.d/inetd start'.
Steven E. Protter
Exalted Contributor

Re: 2 inetd processes 100% cpu??

Shalom,

I thought you could only have one of those puppies running.

I think you should reboot your system if the process won't die.

There have been a number of inetd patches over the years which you might need.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: 2 inetd processes 100% cpu??

It is actually normal for 2 inetd processes to run but only very briefly. Each time a valid incoming connection is detected, inetd fork()'s a new process so that breifly both the parent and child are "inetd". Next the child process does and exec() and becomes another process such as telnetd. While it is possible that ps could detect this condition, it would be very, very rare that it would be observed because the exec() normally happens so quickly.

I suspect that this was pilot error and more than one inetd was started.

If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: 2 inetd processes 100% cpu??

I should add that Patrick's suggestion of examining the PID's and PPID's is how you determine if there is a bug in inetd which might require a patch. Another possible condition that MIGHT result in 2 inetd's having a parent-child relationship is a bad inetd.conf entry but if there is no parent-child relationship then it is pilot error.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: 2 inetd processes 100% cpu??

Oh, in case you didn't think of this: DO NOT kill the inetd process from a remote location. Do this from the console. You will likely lose all your current connections.


Bill Hassell, sysadmin
rick jones
Honored Contributor

Re: 2 inetd processes 100% cpu??

While it is always good practice to do "things networking" from the console, I'm not sure that killing the inetd would necessarily kill a current session. I'm reasonably sure that a telnet session will have disassociated itself from inetd, and IIRC ssh sessions spawn from their own sshd.

Now, if you cannot get a _new_ inetd running, then establishing a new telnet session might be a problem :)

If the two inetd's spinning out of control ever happens again, it might be good to get a tusc trace of each to see what system calls, if any, they are making. That could very likely help in diagnosing the problem.

I forget what inetd does for "internal" services - if it handles them via the existing inetd process, or if it forks a new process called "inetd"
there is no rest for the wicked yet the virtuous have no pillows