开发者

How to snmpset counter32 OIDs using netsnmp

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, 开发者_如何学Gob, 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


According to this man page you can use c :

./snmpset -v2c -cprivate 135.115.155.132 1.3.6.1.2.1.67.1.1.1.1.5.0 c 321

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜