Discussion:
Integer64 support for memory OID 1.3.6.1.4.1.2021
Kristin Thompson
2017-07-17 16:48:44 UTC
Permalink
Hello,

Negative values are being returned for OID 1.3.6.1.4.1.2021.4 when we have
2TB RAM in a server (we have 3TB).
I understand from our ticket with Red Hat support that this is due to these
objects being Integer32 instead of Integer64.
our values:
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: -1184633732 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: -2082384716 kB

Is anyone aware of development related to changing this to Int64?

From support:
memTotalReal OBJECT-TYPE SYNTAX Integer32
memTotalFree OBJECT-TYPE SYNTAX Integer32

Currently running RHEL 6.8 with net-snmp 5.5.60.

Thanks,

Kristin Thompson
Unix System Administrator
Memorial Hermann Healthcare System
Ulrich Windl
2017-07-18 06:11:39 UTC
Permalink
Nachricht
Post by Kristin Thompson
Hello,
Negative values are being returned for OID 1.3.6.1.4.1.2021.4 when we have
2TB RAM in a server (we have 3TB).
I understand from our ticket with Red Hat support that this is due to these
objects being Integer32 instead of Integer64.
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: -1184633732 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: -2082384716 kB
Is anyone aware of development related to changing this to Int64?
Nobody will ever change the type of an existing OID as it would break compatibility.
The maximum amount you can represent with a signed 32-bit integer is about 1.98TiB.
Maybe just add 2^32 in the meantime:
2^32+-1184633732
3110333564

Regards,
Ulrich
Post by Kristin Thompson
memTotalReal OBJECT-TYPE SYNTAX Integer32
memTotalFree OBJECT-TYPE SYNTAX Integer32
Currently running RHEL 6.8 with net-snmp 5.5.60.
Thanks,
Kristin Thompson
Unix System Administrator
Memorial Hermann Healthcare System
Loading...