原文:http://www.puppeter.cn/?p=624
安裝配置
# cd /home/src
# wget http://nchc.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.4.2.1.tar.gz
# tar xvfz net-snmp-5.4.2.1.tar.gz
# cd net-snmp-5.4.2.1
# ./configure –prefix=/usr/local/net-snmp –enable-mfd-rewrites
snmp協議選擇v2c
# make && make install
# vi /etc/rc.local
/usr/local/net-snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -c /etc/snmp/snmpd.conf &
測試
# snmpwalk -v2c -c valeftp ip地址 system
修改Cacti中相關配置
在Cacti管理頁面中選擇Console->Data Source
找到需要修改的埠(即流量大於100M的埠),修改Output Type ID為 In/Out bits (64-bit counters)(原來為In/Out bits)。
如何檢測伺服器的net-snmp是否支持64bit計數
使用OID “ifHCInOctets”
不支援的情況
# snmpwalk -v 2c -c public 192.168.0.1 ifHCInOctets
IF-MIB::ifHCInOctets = No Such Object available on this agent at this OID
支援的情況
# snmpwalk -v 2c -c public 192.168.0.2 ifHCInOctets
IF-MIB::ifHCInOctets.1 = Counter64: 190305466
IF-MIB::ifHCInOctets.2 = Counter64: 2238924259791
IF-MIB::ifHCInOctets.3 = Counter64: 12021323
IF-MIB::ifHCInOctets.4 = Counter64: 0
Hits: 159