I have a somewhat related question, but specifically regarding querying the device for total disk space in a volume. I am running the following command in order to poll the device for total space used by a volume:
#> snmpwalk -c public -v 1 10.66.200.56 .22.214.171.124.4.1.7126.96.36.199.1.3.5
But it comes back negative whenever the volume in question is over 2TB. Is this a known issue? Is there a work around? When or how can i fix this? It is causing some monitoring problems that i am trying to work around using perl, but so far i am not having any luck.
Until DOT 7.3, ONTAP only supports SNMP v1, and thus can only handle 32-bit values. So you'll find if you look at the MIB file that many values that need more bits are split between high order and low order bits. So to get the true value, you have to combine the 2 values to get the real value.
Starting in ONTAP 7.3, ONTAP supports SNMP v3 which supports larger values.
If you support v3, you should be able to query the 64-bit value instead:
If you want to continue using the low/high values for v1, here is the public report for a similar issue:
Some entries in the Quota Table of the SNMP MIB, including but not necessarily
limited to qrVKBytesLimit (snmp.188.8.131.52.4.1.7184.108.40.206.1.5.1) are internally
defined as uint4, which is an unsigned 32 bit integer.
However the SNMP definition of INTEGER is a +- 2147483647 range.
So when the internal count exceeds 2147483647, the displayed value will show as
a negative number.
Post process the value to produce an unsigned 32 bit integer.
if (x < 0) x = 4294967296 + x
For file systems larger than 4TB the qrV2Table(.220.127.116.11.4.1.718.104.22.168) may be
used. Starting with ONTAP 6.5 the qrV2Table splits the snmp variables into
High 32bit and Low 32bit snmp INTEGERs.
The equation to combine these is:
if (Low >= 0) x = High * 2^32 + Low
if (Low < 0) x = (High + 1) * 2^32 + Low