常见的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 |