Kunal Rupera wrote:
> You cannot use MRTG anymore. You have to have a SNMP enabled device [and
> the SNMP implementation should work properly like Brad pointed out] for
> MRTG to monitor. The only option i feel you are left with is find a SNMP
> capable router.
>
> Kunal.
>
Bulldust! There are a stack of scripts/MRTG plugins on the web that allow you
to monitor a linux
interface.
<Snip bit of /etc/mrtg.cfg>
### Global Defaults
# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits
EnableIPv6: no
Target[target_eth2]: `/usr/local/bin/mrtg-netstat target_eth2 eth2`
SetEnv[target_eth2]: MRTG_INT_IP="" MRTG_INT_DESCR="ETH2"
MaxBytes[target_eth2]: 140000
Title[target_eth2]: Traffic Analysis for 4 -- ADSL Router
PageTop[target_eth2]: <H1>Traffic Analysis for 4 -- ADSL</H1>
</snip>
[EMAIL PROTECTED]:~$ cat /usr/local/bin/mrtg-netstat
#!/bin/sh
grep="/bin/grep"
cut="/usr/bin/cut"
uptime="/usr/bin/uptime"
devsta="/proc/net/dev"
# netstat name interface
name=$1
interface=$2
line=`/bin/cat $devsta | $grep "$interface"`
line=`echo $line | $cut -d":" -f 2`
ibytes=`echo $line | $cut -d" " -f 1`
obytes=`echo $line | $cut -d" " -f 9`
uptim=`$uptime | $cut -d"," -f1`
uptim=`echo $uptim | $cut -d" " -f3,4`
echo $ibytes
echo $obytes
echo $uptim
echo $name
Wish you guys would learn to use google
Brad
--
"Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so." -- Douglas Adams
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/dubailug/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/