net-snmp的一些小细节,Oid获取不到数据的问题

I am using centos Operating System.
i am trying to get the memory statistics of localhost through snmpget command, i am getting this error.

snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.4.6
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::memAvailReal
But, if i fire this one … i am getting the output…

snmpget -v 1 -c public localhost .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (58756) 0:09:47.56
I am not getting what I am doing wrong. I exported the path of /usr/share/snmp/mibs/ to $PATH variable.
can any one help me out.

answer 1:
You’d better read the FAQ page of net-snmp,

http://www.net-snmp.org/wiki/index.php/FAQ:Applications_09

You should use

snmpget -v 1 -c public localhost .1.3.6.1.4.1.2021.4.6.0.

answer 2:

Also useful to do snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1 and you will see what OIDs exist in your tree
– k1eran
Jul 5 '13 at 8:46
We were having the same issue, (for a piece of networking equipment though) however our instance sub-identifier was 1, not 0.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值