The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script for turning processes in etc/inetd.conf on and off thomi39 SUN Solaris 0 03-18-2008 07:48 PM
linux.conf.au: Tying up all those loose ends - iTWire iBot UNIX and Linux RSS News 0 11-26-2007 10:00 AM
Cannot edit inetd.conf??? shorty UNIX for Dummies Questions & Answers 2 03-08-2007 12:13 PM
Linux file corresponding to HP-UX inetd.conf jyotipg UNIX for Advanced & Expert Users 2 08-14-2003 06:31 AM
inetd.conf file = gone on my home linux box nemex UNIX for Dummies Questions & Answers 2 12-26-2001 09:51 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-23-2006
Registered User
 

Join Date: Mar 2005
Posts: 76
inetd.conf in linux

I need to put the following line in inetd.conf:
stats stream tcp nowait nobody /usr/local/bin/mrtgsysinfo mrtgsysinfo
but my version of linux don't seem to allow that, ie there is no inetd.conf. How do i set that up in linux (red hat enterprise 3).
Reply With Quote
Forum Sponsor
  #2  
Old 10-23-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 401
Go to the /etc/xinetd.d directory. You'll need to create a file (usually named after the program) and put your entries in there. Something like this (don't take my word for it, check out the xinetd man page):

Code:
service stats
{
        server = /usr/local/bin/mrtgsysinfo
        user = nobody
        socket_type = stream
        protocol = tcp
        wait = no
}
Carl
Reply With Quote
  #3  
Old 10-24-2006
Registered User
 

Join Date: Mar 2005
Posts: 76
Thanks for the reply, still stuck

However when i try to do the following , which works on all my solaris boxes.....

telnet otlnx001 7260
Trying 172.16.32.241...

I get....

telnet: Unable to connect to remote host: Connection refused

obviously i am missing something, both hosts.allow and hosts.deny are empty.
Reply With Quote
  #4  
Old 10-24-2006
Registered User
 

Join Date: Mar 2005
Posts: 76
error when running xinetd in debug

I also ran xinetd in debug mode. It gave me the following error:

06/10/24@11:37:08: ERROR: 366 {service_fill} Port not specified and can't find service:stats with getservbyname
Reply With Quote
  #5  
Old 10-24-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 401
That's why I said to man xinetd. I gave you a quick and dirty file that may have no relation to what you really need

Based on the site you probably grabbed this from (http://www.dmzs.com/~dmz/projects/mrtgsystemload.html) and your error message, you still need to update /etc/services.

Quote:
Each system runs the script from inetd, so /etc/services &
/etc/inetd.conf need to be updated.
services:
# added by dmz for mrtg
stats 7260/tcp

inetd.conf:
# added by dmz 0330 for mrtg
stats stream tcp nowait nobody /usr/local/bin/mrtgsysinfo mrtgsysinfo
It's not going to know what port to be listening on unless you add the info to /etc/services (or possibly in the xinetd file as a "port = 7260" line).

Carl
Reply With Quote
  #6  
Old 10-24-2006
Registered User
 

Join Date: Mar 2005
Posts: 76
Already did that

I already had the line in the services file. I also tried your ports= in the xinetd file but it did not change anything.
Reply With Quote
  #7  
Old 10-24-2006
Registered User
 

Join Date: Sep 2006
Posts: 52
Could you please let me know which OS are you using? If you are using redhat or fedora. seems iptables are blocking the port.

Let me know


Prashant,
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0