Operating System - HP-UX
1833194 Members
3334 Online
110051 Solutions
New Discussion

Multiple instances of inetd...;-000

 
Suhas_2
Regular Advisor

Multiple instances of inetd...;-000

Hi friends,
Last week I cam across a strage problem on one of my HP-UX 11 machines. To my surprise I found multiple instances of inetd running on the system and the system was still sunning very smoothly. Can anybody help me regarding the problem ?....

Rgds...
Suhas.
Never say "Die"
1 REPLY 1
Alex Glennie
Honored Contributor

Re: Multiple instances of inetd...;-000

This is normal behavior, inetd spawns multiple child inetd
processes when inetd gets very busy.

See the following diagram in UNIX Network Programming:

start inetd :
socket()
|
bind() (for each service in /etc/inetd.conf)
|
listen()
|
----> select() (for readability)
| |
| accept()
| |
| fork()
| / | / | parent child (second inetd)
| | |
| close() close() (all files other than socket)
|____| |
dup socket to STDIN STDOUT STDERR and close socket
|
setgid()
setuid()
|
exec() e.g. remshd, telnetd

You can verify it very easily.

1. If you use this script on OneMachine:

while true
do
echo "===========================" >> inetd.log
ps -ef|grep inetd |grep -v grep |grep -v tail >> inetd.log
done

2. From two other windows execute:

remsh OneMachine ls

3. In a third window run:

tail -f inetd.log

Then you will see that for a short time you have 2 inetd's.
This also occurs on the backup system. So your answer is yes
this does occur and this is the expected behavior.