当前位置:   article > 正文

snmp安装

host-resources-mib::hrsystemuptime.0 = no more variables left in this mib vi
linux系统snmp有两个包:
  net-snmp (agent端)
  net-snmp-utils (nms端)
 如果监控端要主动接收被监控端信息,net-snmp也需要安装.

1.查看包是否安装
[root@ocp ~]# rpm -qa | grep snmp  
net-snmp-libs-5.1.2-13.el4
[root@ocp ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
2.安装包
[root@ocp RPMS]# rpm -ivh net-snmp-5.1.2-13.el4.i386.rpm 
warning: net-snmp-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:net-snmp               ########################################### [100%]
[root@ocp RPMS]# rpm -ivh net-snmp-utils-5.1.2-13.el4.i386.rpm 
warning: net-snmp-utils-5.1.2-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing...                ########################################### [100%]
   1:net-snmp-utils         ########################################### [100%]
3.启动服务
[root@ocp RPMS]# service snmpd start
Starting snmpd: [  OK  ]
[root@ocp RPMS]# chkconfig --list snmpd
snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@ocp RPMS]# chkconfig -level 35 snmpd on   --开机自动启动[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)


4.查看snmp安装位置
[root@ocp RPMS]# rpm -ql net-snmp | less
/etc/logrotate.d/snmpd
/etc/rc.d/init.d/snmpd
/etc/rc.d/init.d/snmptrapd
/etc/snmp
/etc/snmp/snmpd.conf
/usr/bin/ucd5820stat
/usr/sbin/snmpd
/usr/sbin/snmptrapd
/usr/share/doc/net-snmp-5.1.2
/usr/share/doc/net-snmp-5.1.2/AGENT.txt
/usr/share/doc/net-snmp-5.1.2/COPYING
/usr/share/doc/net-snmp-5.1.2/ChangeLog.trimmed
/usr/share/doc/net-snmp-5.1.2/EXAMPLE.conf
/usr/share/doc/net-snmp-5.1.2/FAQ


5.
[root@ocp RPMS]# snmpwalk -v 2c -c public localhost host
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (4984763) 13:50:47.63
HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26937943/viewspace-1814379/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26937943/viewspace-1814379/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/559404
推荐阅读
相关标签
  

闽ICP备14008679号