If you don't have SNMP turned-on, on the linux box, then the way I do it is use the technique that's been around a while grabbing mailstats from boxes.....
First create a service in either your inetd.conf(old linux/Unix) or create a file in /etc/xinetd.d with the service in it. Here is an example I use on a Solaris box (inetd.conf): df-stats stream tcp nowait root /bin/df df -k cpu-stats stream tcp nowait root /bin/uptime uptime io-stats stream tcp nowait root /bin/iostat iostat 1 5 smtp-stats stream tcp nowait root /bin/mailstats mailstats In your services file your add line to unique port numbers for these services Then just telnet to the port on the machine and you get your stats. I have a perl script that is called inside the mrtg config files that parses the data and mrtg does the rest Trent Trent Melcher Network/System Administrator Startouch International LTD. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Corey Goldberg > Sent: Monday, February 14, 2005 1:08 PM > To: [EMAIL PROTECTED] > Subject: [mrtg] Re: Monitoring Linux Server > > > >>>I have a perl script that I copied. It works for some of > the items - > >>>traffic and memory/swap usage - but not for others - CPU > and disk IO. I > >>>would like to grab uptime as well. > > >>How are the scripts connecting to the servers you are mointoring. > >>rstat? telnet? ssh? > > >Here's one. > ># this is the eth0 traffic graphing section from > /proc/net/dev # > > > gotcha.. > that script will get data from the machine it's running on. > I write stuff that attaches to the machines I am monitoring > remotely. That way I can have a monitoring setup with a > central server that probes remote machines for stats and > returns them to MRTG for graphing. > > -- > Unsubscribe mailto:[EMAIL PROTECTED] > Archive http://www.ee.ethz.ch/~slist/mrtg > FAQ http://faq.mrtg.org Homepage http://www.mrtg.org > WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi > -- Unsubscribe mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/mrtg FAQ http://faq.mrtg.org Homepage http://www.mrtg.org WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
