From: Buchan M. <bg...@st...> - 2008-11-06 15:59:27
|
On Thursday 06 November 2008 16:10:22 Guðmundur Örn Ingvarsson wrote: > The problem is I don't want to convert or unpack the string. I just want > the string but devmon won't let me have it. It's not really a string (on the wire). snmpwalk is converting it to a string for you for display (similar to the way a hex viewer does ...). Take a look at the compaq-server/log test. For example: SNMPv2-SMI::enterprises.232.6.2.11.3.1.6.0 = Hex-STRING: 07 D8 04 1E 00 1C $ grep 232.6.2.11.3.1.6 /usr/share/devmon/templates/compaq-server/log/oids cpqHeEventLogInitialTime: 1.3.6.1.4.1.232.6.2.11.3.1.6 : branch $ grep ^cpqHeEventLogInitial /usr/share/devmon/templates/compaq- server/log/transforms cpqHeEventLogInitialTimeTxt: UNPACK : {cpqHeEventLogInitialTime} H12 cpqHeEventLogInitialYHex: SUBSTR : {cpqHeEventLogInitialTimeTxt} 0 4 cpqHeEventLogInitialMHex: SUBSTR : {cpqHeEventLogInitialTimeTxt} 4 2 cpqHeEventLogInitialDHex: SUBSTR : {cpqHeEventLogInitialTimeTxt} 6 2 cpqHeEventLogInitialHHex: SUBSTR : {cpqHeEventLogInitialTimeTxt} 8 2 cpqHeEventLogInitialmHex: SUBSTR : {cpqHeEventLogInitialTimeTxt} 10 2 cpqHeEventLogInitialY: CONVERT : {cpqHeEventLogInitialYHex} hex cpqHeEventLogInitialM: CONVERT : {cpqHeEventLogInitialMHex} hex cpqHeEventLogInitialD: CONVERT : {cpqHeEventLogInitialDHex} hex cpqHeEventLogInitialH: CONVERT : {cpqHeEventLogInitialHHex} hex cpqHeEventLogInitialm: CONVERT : {cpqHeEventLogInitialmHex} hex In your case, since you don't want to convert the Hex values, an unpack should be sufficient: > .1.3.6.1.4.1.1588.2.1.1.1.7.2.1.13.1 = Hex-STRING: 20 00 00 05 1E 35 63 DF So, try: bar: UNPACK : {foo} H16 Then bar should contain the string 200000051E3563DF Regards, Buchan |