Re: monitoring ppp0 with mrtg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

> Hello,
> I am trying to monitor a standard dial-up connection as ppp0
> (non-static ip) with mrtg. I can generate a cfg file, but find ppp0 as
> disabled. Can some one please suggest a suitable configuartion syntax
> for ppp0.

I use a script like this:
/usr/local/sbin/mrtgstats-net.sh
#!/bin/sh

awk '
/'$1':/ {
$0=substr($0,index($0,":")+1);
print $1;print $9
}
' /proc/net/dev

And my mrtg.cfg looks like this:

--
Target[ppp0]: `/usr/local/sbin/mrtgstats-net.sh ppp0`
Title[ppp0]: Internet Traffic
MaxBytes[ppp0]: YOUR_SPEED_HERE_IN_BYTES/S
PageTop[ppp0]: <h1>Internet Traffic</h1>
Options[ppp0]: growright,bits,noinfo
--

This can be used to generate stats for others interfaces as well.

--
Regards,
Alejandro Flores
http://www.triforsec.com.br/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux