Linuxest 2010-07-30
步骤如下:
1. RedHat Linux每台主机上面操做
vi /etc/snmp/snmpd.conf
找到这行 view systemview included .1.3.6.1.2.1.1 (snmp配置文件默认的配置,即系统信息)
2.在上面那行下面加入如下信息
view systemview included .1.3.6.1.2.1.2 (接口信息)
view systemview included .1.3.6.1.2.1.3 (ip信息)
view systemview included .1.3.6.1.2.1.4 (ip数据)
3.重新启动snmp服务
/etc/init.d/snmpd restart (该命令仅用于redhat 系统)
4.测试应该可以得到相对应的snmp信息(snmpwalk命令支持需要安装net-snmp-utils-5.3.1-19.el5包或使用mibbrowser软件测试)
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.2
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.3
snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.4