[mrtg] Re: Problem reading specific OID
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Tue Oct 12 00:36:38 MEST 1999
> The following error occoures.
>
>
> cannot encode Object ID .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672: Cannot encode subid 2872348672 at SNMP_util.pm line 957.
> SNMPGET: Failed to reach target: ".1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672&.1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348673:publ
> ic at svvie4". I tried multiple times!
Hmmm, 2872348672 == 0xAB349000 ...
Looks like this problem could have to do with signed integers.
I wouldn't know if this is an SNMP_util problem or that the OID is wrong.
Instead of correcting the problem (which you can't or else you wouldn't ask
this question) you may want to work around it:
Inside MRTG:
Target[SVVIE4_CPU]: `get_cpu_for svvie4 public`
and a script called "get_cpu_for":
#!/bin/bash
A=`snmpget $1 $2 .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348672 \
| sed 's/^.*"//;s/\%.*$//'`
B=`snmpget $1 $2 .1.3.6.1.4.1.2.6.71.200.2.1.3.1.5.1.2872348673 \
| sed 's/^.*"//;s/\%.*$//'`
echo $A
echo $B
echo some time
echo $1
Todo: check (and correct, if necessary) the script. Build in some error
checking.
HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
--
* To unsubscribe from the mrtg mailing list, send a message with the
subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list