Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-11-2004, 03:57 AM   #1
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
Question How do I know, which services within xinetd are running

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
Old 08-11-2004, 04:10 AM   #2
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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
Old 08-11-2004, 05:09 AM   #3
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Original Poster
Rep: Reputation: 15
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)
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...

Old 08-11-2004, 07:32 AM   #4
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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.
Old 08-11-2004, 07:47 AM   #5
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Original Poster
Rep: Reputation: 15
Thanks ! It was wonderfull

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I querry services running within xinetd ? saneax Linux - Software 3 01-13-2007 10:49 PM
stopping services not in xinetd.d branden_burger Linux - Security 2 04-12-2005 08:34 PM
xinetd /etc/services iftiuk Linux - Networking 7 04-17-2004 12:36 AM
xinetd, ftp, and other services jimi_j Linux - Software 0 03-09-2004 05:37 PM
start services without xinetd penguinview Linux - Newbie 3 09-27-2003 12:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration