常见的snmp命令

论坛 期权论坛 编程之家     
选择匿名的用户   2021-5-23 05:48   87   0

常见的snmp命令:

snmptranslate -IR -Tp enterprises
smilint --help

使用不同的模版生成代码
mib2c -c mib2c.iterate.conf sledTable
mib2c -c mib2c.scalar.conf dcObjects

检查mib文件
cp SCORPION-MIB.txt /usr/share/snmp/mibs/
smilint -l 6 SCORPION-MIB.txt
查看mib命令
snmptranslate -IR -On dcObjects
snmptranslate -IR -Tp dcObjects
snmptable -v2c -c dcprivate -C i localhost managerTable
snmpset -v2c -c dcprivate localhost serverName.3.1.1 s "SERVER-1-1-1"

snmpget -v2c -c dcprivate localhost dcObjects.0

snmpget -v2c -c dcprivate localhost sysUpTime.0

adding the following line to /var/net-snmp/snmpd.conf:
createUser admin MD5 "authentication" DES encryption
adding the following line to /usr/share/snmp/snmpd.conf:
rwuser admin

snmpd查看日志:
snmpd -Lo -d -f
snmptable -v3 -u admin -a MD5 -A authentication -x DES -X encryption -l authPriv localhost testTable

snmpset -v2c -c dcprivate localhost trapSeverity.0 i 1
snmpwalk -v2c -c dcpublic localhost trapTargetObjects
snmpget -v2c -c dcprivate localhost dcLEDStatus.0

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP