以下介紹如何裝設 mrtg 監測 eth0 的流量
yum -y install net-snmp
vi /etc/snmp/snmpd.conf
com2sec local localhost public
com2sec mynetwork 192.168.1.0/24 public
group MyRWGroup v1 local
group MyROGroup v1 mynetwork
view all included .1.3.6.1.2.1.1 80
access MyROGroup "" any noauth 0 all none none
access MyRWGroup "" any noauth 0 all all all
syslocation Fedora Core 6
syscontact someone <someone@mail.com.tw>
chkconfig snmpd on
service snmpd start
yum -y install mrtg
mkdir /home/WWW/www/mrtg #或者其他你要產生mrtg統計檔案的地方
cfgmaker –global 'WorkDir: /home/WWW/www/mrtg' \
> –global 'Options[_]: bits,growright' \
> -global 'Language: big5' \
> –output /etc/mrtg/mrtg.cfg \
> –ifref=ip \
> 205.71.38.xxx
indexmaker –output /home/WWW/www/mrtg/index.html /etc/mrtg/mrtg.cfg
mrtg /etc/mrtg/mrtg.cfg
mrtg /etc/mrtg/mrtg.cfg
mrtg /etc/mrtg/mrtg.cfg
然後就可以去看是否產生流量統計圖表了
以上是參考自 這裡