[erlang-questions] os_mon_mib error

Martin Bjorklund mbj@REDACTED
Wed May 28 08:19:35 CEST 2008


Hi,

"Edwin Fine" <erlang-questions_efine@REDACTED> wrote:
> Hi all,
> 
> I am learning to use OTP snmp. I've done an snmp:config() for a v3 agent,
> which is running ok, it seems. However, when I do an snmpwalk, I get a
> wrongValue error. I'm running Ubuntu Feisty x86_64 using Erlang/OTP R12B-2.
> This only happens if I do an os_mon_mib:load(snmp_master_agent).
> 
> What am I doing wrong?

This is a bug in os_mon.

> $ snmpwalk -v 3 -l authPriv -m ALL -u initial -a MD5 -A **** -x DES -X ****
> 127.0.0.1:4000 otp
> ... snip ...
> OTP-MIB::applVsn.1.7 = STRING: 2.12.2
> OTP-OS-MON-MIB::loadMemorySystemWatermark.0 = INTEGER: 80
> OTP-OS-MON-MIB::loadMemoryErlProcWatermark.0 = INTEGER: 5
> Error in packet.
> Reason: (genError) A general failure occured
> Failed object: OTP-OS-MON-MIB::loadMemoryErlProcWatermark.0

This tells us that doing a GET-NEXT on loadMemoryErlProcWatermark.0
fails.  The object after this one in the MIB is
loadSystemTotalMemory.

> The agent error is:
> 
> User error: Got 8386678784 from {os_mon_mib,load_table,[]}. Using wrongValue

This tells us that when the agent called the instrumentation function
for loadSystemTotalMemory (which is the function load_table in module
os_mon_mib), it returned 8386678784, which the agent says is a bad
value.

The reason for the wrongValue is that loadSystemTotalMemory is a
Gauge32, and 8386678784 is not a 32-bit integer.  And this is since
you run on a 64-bit platform.

The MIB could be extended with an object of type CounterBasedGauge64
from the HCNUM-TC MIB (RFC2856), or the implementation would have to
truncate this value.  In either case - bug in os_mon.


/martin



More information about the erlang-questions mailing list