Garbaged SNMP values (tools)

  1. When fetching data with snmp*.py command-line tools, some values do not print out nicely:
 $ -v2c -c public .
 SNMPv2-SMI::enterprises.14988. =
 OctetString: ˇČ

where Net-SNMP gives nicely formatted human-readable string:
 $ snmpget -v2c -c public .
 SNMPv2-SMI::enterprises.14988. =
 Hex-STRING: 00 17 B7 22 08 C8

What can be done to PySNMP to make it returning HEX data in human-readable?
  1. The difference is that Net-SNMP prints values into hex by-default, whereas pysnmp does not do that. You can force to work similarily with the -OT command line parameter.
$ -OT -v2c -c public .
SNMPv2-SMI::enterprises.14988. =
OctetString: 00 17 b7 22 08 c8

Another matter is MIB lookup - when snmp*.py tool can use a MIB to figure out what are the display conventions for particular value type, it will reformat the value in a human-readable form.

To let MIB lookup work, please pass appropriate MIB name to snmp*.py tool through command line:

$ -m IP-MIB,IF-MIB -v2c -c public .