如何使用 netsnmp snmpset counter32 OID
我正在尝试使用 netsnmp 中的 snmpset 设置 Counter32 类型的 OID 值,但我无法弄清楚要指定哪种数据类型?
看看 ./snmpset -h 我看到以下内容:
TYPE: one of i, u, t, a, o, s, x, d, b, n
i: INTEGER, u: unsigned INTEGER, t: TIMETICKS, a: IPADDRESS
o: OBJID, s: STRING, x: HEX STRING, d: DECIMAL STRING, b: BITS
U: unsigned int64, I: signed int64, F: float, D: double
没有一个是计数器,我尝试过整数和无符号 int 但没有成功:
./snmpset -v2c -cprivate 135.115.155.132 1.3.6.1.2.1.67.1.1.1.1.5.0 u 321
Bad variable type (Type of attribute is Counter32, not Unsigned32)
想法?
感谢您的任何想法
I'm trying to use snmpset from netsnmp to set an OID value of type Counter32, but I can't figure out which datatype to specify?
Looking at ./snmpset -h I see the following:
TYPE: one of i, u, t, a, o, s, x, d, b, n
i: INTEGER, u: unsigned INTEGER, t: TIMETICKS, a: IPADDRESS
o: OBJID, s: STRING, x: HEX STRING, d: DECIMAL STRING, b: BITS
U: unsigned int64, I: signed int64, F: float, D: double
None of which are counter, I've tried integer and unsigned int without success:
./snmpset -v2c -cprivate 135.115.155.132 1.3.6.1.2.1.67.1.1.1.1.5.0 u 321
Bad variable type (Type of attribute is Counter32, not Unsigned32)
Thoughts?
Thanks for any ideas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据这个手册页你可以use c :
我现在无法尝试。我不确定它是否适用于 Net-SNMP 此跟踪器似乎表明这是所请求的功能。
According to this man page you can use c :
I'am not able to try at the moment. I'am not sure it's for Net-SNMP this tracker seems to show that it's a feature requested.