How do I know, which services within xinetd are running
Hello,
I am writing a simple shell script to know which daemons are running, on my RH9 Server. I am having problem, if some of the daemons are started within xinetd, there seems to be no way to know if the service is actually running. Parsing of Log files seems to be difficult, as on the same port there could be two applications which could be configured to be ON.. ie lets say wu-ftp and vsftp, which are installed by an user by mistake, and via chkconfig he gets both of them to be ON. However only one starts, How do I know which One... Manually trying to telnet and parsing the output seems to be overkill. Is there some command I do not know, like service smb status says samba is running can there be some command which tells me, which services within xinetd are running. Thanks and sincere regards Sanjay Upadhyay |
you can use the command
grep disable /etc/xinetd.d/*|grep no This will show the services that will be started by xinetd. Alternately you can use the chkconfig --list and look for xinetd - generally the last few lines of teh chkconfig output |
Hi ppuru,
I have already tried to parse output of chkconfig... My problem is evident... from the following steps 1) Installed vsftpd 2) chkconfig --level 345 vsftpd on 3) service xinetd reload ... This is sure to start the vsftpd... (I assume) Now By mistake.. a newbie like me ;) 4) Installs wu-ftp 5) chkconfig --level 345 wu-ftp on 6) service xinetd restart ... Now vsftpd is found only to run... assuming that only one of them can run, safely How can I know which one is running... as both grep disable /etc/xinetd.d/*|grep no and chkconfig --list will be positive... My special requirement will also fail, if more services like smbd and cups are included in xinetd.d directory.... and for the first time after chkconfig cups on is done, but xinetd is not restarted.... is there a definit way to know only the service actually running, rather than service which are configured to be started at boot... Thanks |
If you're running xinetd's internal service listing(/etc/xinetd.d/services), you can telnet into it and it'll return the a list of services xinetd is running. By default it only allows connection form localhost.
|
Thanks ! It was wonderfull
Hi,
Thanx so much, although, I dont get the service application name... I get is sgi_fam tcp 1038 ftp tcp 21 services tcp 9098 although if I could get to know if that was vsftp or wu-ftp, it would be great. Deep regards |
All times are GMT -5. The time now is 06:58 AM. |