[mrtg] External Monitoring Scripts

Julio Sardella shk at linuxbr.com.br
Thu May 17 21:16:59 MEST 2001


i am using this script to get the info from the ethernet card...:

[root at prime1 /]# cat ethstat
#!/bin/awk -f
/eth2:/ { $0=substr($0,index($0,":")+1);
print $1;print $9}


and run like that:
[root at prime1 /]# ./ethstat /proc/net/dev
287416286
47166146

That is all the information wich mrtg needs to mount the graphic?
because
in the docs the number of lines its 4:
Line 1 current state of the first variable, normally 'incoming bytes
count'
Line 2 current state of the second variable, normally 'outgoing bytes
count'
Line 3 string (in any human readable format), telling the uptime of the
target.
Line 4 string, telling the name of the target.

I can forget about the other two lines? can anyone send a correct script
to
get all the info from the ethernet? (i din't know very well abou shell
script)

Thanks!


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
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



More information about the mrtg mailing list