2008年5月16日 星期五

Debug progress of xinetd

#ps axjf | head -1
PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
# ps axjf | grep xinetd
3122 10550 10550 3122 pts/3 10550 S+ 0 0:00 | | \_ /bin/sh /sbin/service xinetd restart
10550 10557 10550 3122 pts/3 10550 S+ 0 0:00 | | \_ /bin/bash /etc/init.d/xinetd restart
10557 10568 10550 3122 pts/3 10550 S+ 0 0:00 | | \_ /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; xinetd -d -stayalive -reuse -pidfile /var/run/xinetd.pid
10568 10569 10550 3122 pts/3 10550 S+ 0 0:00 | | \_ xinetd -d -stayalive -reuse -pidfile /var/run/xinetd.pid

[root@localhost(3:48:34pm):~/etc/xinetd.d]cat /var/run/xinetd.pid
10569

run the xinetd manually as following command
/usr/sbin/xinetd -filelog /var/adm/xinetd.log -f /etc/xinetd.conf -d -stayalive -reuse -pidfile /var/run/xinetd.pid

Some observations
1. While we restart the service, it forks another shell to run the practical daemon (in the case, it is the /etc/init.d/xinetd)
2. ulimit is a bash buildin command. We can use it to control the resources available to a process started by the shell (here is bash).

沒有留言: