網絡流量分析:
一安裝SNMP簡單網絡管理協議:
cd /usr/ports/net/net-snmp
make install
make clean
編輯snmp.conf配置文件:
cd /usr/local/share/snmp/
vi snmpd.conf
rocommunity mrtg
啟動SNMP:
cd /usr/local/etc/rc.d
rm snmpd.sh
vi snmpd.sh
#! /bin/sh
/usr/local/sbin/snmpd
二安裝MRTG:
cd /usr/ports/net/mrtg
make install
make clean
cd /usr/local/etc/mrtg
/usr/local/bin/cfgmaker
[email protected] > mrtg
vi mrtg
添加mrtg的工作目錄:
WorkDir: /home/dyd/public_Html/mrtg
Language: chinaese
在/home/dyd/public_html/mrtg目錄裡生成index.html
/usr/local/bin/indexmaker --title '標題' --output /home/dyd/public_html/mrtg/index.html mrtg
/usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg #多執行幾遍直到沒有錯誤為止。
如果想定時執行mrtg的話就加入到crontab裡就可以了。