SNMP returns hex value

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Shagrat

SNMP returns hex value

Post by Shagrat »

Got a weird one that hopefully has a simple answer...

I would like to pull DNS stats via snmp, which I am (using .1.3.6.1.4.1.2021.50.101). Using my OpenView snmp tools, the values returned are perfect:

snmpwalk -c xxx xxxx .1.3.6.1.4.1.2021.50.101
ucdavis.50.101.1 : OCTET STRING- (ascii): 50579
ucdavis.50.101.2 : OCTET STRING- (ascii): 2572
ucdavis.50.101.3 : OCTET STRING- (ascii): 92
ucdavis.50.101.4 : OCTET STRING- (ascii): 1980
ucdavis.50.101.5 : OCTET STRING- (ascii): 99
ucdavis.50.101.6 : OCTET STRING- (ascii): 0
ucdavis.50.101.7 : OCTET STRING- (ascii): 2342
ucdavis.50.101.8 : OCTET STRING- (ascii): 1223
ucdavis.50.101.9 : OCTET STRING- (ascii): 8379
ucdavis.50.101.10 : OCTET STRING- (ascii): 67266

However, when I use the snmp tools provided in the net-snmp package I get hex values:

UCD-SNMP-MIB::ucdavis.50.101.1 = Hex-STRING: 35 34 30 37 39 0A
UCD-SNMP-MIB::ucdavis.50.101.2 = Hex-STRING: 32 37 32 38 0A
UCD-SNMP-MIB::ucdavis.50.101.3 = Hex-STRING: 39 36 0A
UCD-SNMP-MIB::ucdavis.50.101.4 = Hex-STRING: 32 32 30 39 0A
UCD-SNMP-MIB::ucdavis.50.101.5 = Hex-STRING: 31 30 36 0A
UCD-SNMP-MIB::ucdavis.50.101.6 = Hex-STRING: 30 0A
UCD-SNMP-MIB::ucdavis.50.101.7 = Hex-STRING: 32 34 35 39 0A
UCD-SNMP-MIB::ucdavis.50.101.8 = Hex-STRING: 31 32 38 39 0A
UCD-SNMP-MIB::ucdavis.50.101.9 = Hex-STRING: 39 30 35 38 0A
UCD-SNMP-MIB::ucdavis.50.101.10 = Hex-STRING: 37 32 30 32 34 0A

Is there a reason why one returns a hex-string and the other and octet string?

Cheers!
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

How does it look like when you add "-Oa" parameter to snmpwalk command?

- Piotr
ang
Posts: 1
Joined: Wed Oct 22, 2003 3:40 am

same problem (HEX to KBytes)

Post by ang »

Hi,
I have the same problem.
I want to view the Traffic in Kbytes via snmp for Brocade 2109 SAN Switch.
But the value returns in HEX. How can i Import the value in cacti in Kilobytes.

(Sorry for my bad english)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests