Hi,
I am just testing with some SNMP on our Filers. During some tests I mentioned something, I can't explain.
The SNMP query dfKBytesTotal returns negative output on some volumes:
snmpget -v 1 -t 30 -Osq -c public FILER
NETWORK-APPLIANCE-MIB::dfKBytesTotal.19 dfKBytesTotal.19 -2071986176 dfKBytesTotal.20 0
The equal command directly issued from the filer returns the following:
ssh FILER df -k VOLUME
Filesystem total used avail capacity Mounted on /vol/VOLUME/ 2222981120KB 2030845132KB 192135988KB 91% /vol/homes02/ /vol/VOLUME/.snapshot 0KB 40077688KB 0KB ---% /vol/homes02/.snapshot
Does anybody have an idea why the snmp output is negative and not same as the df -k from the filer?
Here some information of the test environment:
MIB Version: Version 1.19.3, March 2007 (on filer and localhost) Filer: FAS3050 with OnTap 7.0.2
Best regards Andreas
----------------------------------------- Wincor Nixdorf Int. GmbH WN CIO4 Computing & Storage Heinz-Nixdorf-Ring 1 33106 Paderborn
Phone: +49 5251 693 4215 Fax: +49 5251 693 4200 Mail: andreas.buerger@wincor-nixdorf.com -----------------------------------------
Check the size of your storage value. -2071986176 decimal is FFFFFFFF84800000 hex, but this is a 4-byte word. The same value (-2071986176 decimal) is 84800000 hex as a 2-byte word. 84800000 hex is 2222981120 decimal, which is the value being reported by your df command.
It appears that df uses DWORD values and snmpget uses QWORD values.
-----Original Message----- From: owner-toasters@mathworks.com [mailto:owner-toasters@mathworks.com] On Behalf Of Buerger, Andreas Sent: Thursday, June 21, 2007 12:06 PM To: toasters@mathworks.com Subject: faulty snmp output?
Hi,
I am just testing with some SNMP on our Filers. During some tests I mentioned something, I can't explain.
The SNMP query dfKBytesTotal returns negative output on some volumes:
snmpget -v 1 -t 30 -Osq -c public FILER
NETWORK-APPLIANCE-MIB::dfKBytesTotal.19 dfKBytesTotal.19 -2071986176 dfKBytesTotal.20 0
The equal command directly issued from the filer returns the following:
ssh FILER df -k VOLUME
Filesystem total used avail capacity Mounted on /vol/VOLUME/ 2222981120KB 2030845132KB 192135988KB 91% /vol/homes02/ /vol/VOLUME/.snapshot 0KB 40077688KB 0KB ---% /vol/homes02/.snapshot
Does anybody have an idea why the snmp output is negative and not same as the df -k from the filer?
Here some information of the test environment:
MIB Version: Version 1.19.3, March 2007 (on filer and localhost) Filer: FAS3050 with OnTap 7.0.2
Best regards Andreas
----------------------------------------- Wincor Nixdorf Int. GmbH WN CIO4 Computing & Storage Heinz-Nixdorf-Ring 1 33106 Paderborn
Phone: +49 5251 693 4215 Fax: +49 5251 693 4200 Mail: andreas.buerger@wincor-nixdorf.com -----------------------------------------
Confidentiality Notice:
This e-mail is intended only for the personal and confidential use of the individual to whom it is addressed and may contain information that is privileged, confidential and protected by law. If you are not the intended recipient, you are hereby notified that any use or disclosure of this information is strictly prohibited. If you have received this message in error, please notify the sender immediately by reply e-mail and delete the original message. Your compliance is appreciated.
its snmpV1, you need to do some math to get the appropriate values :)
since there are no 64bit values in netapps implementation there are high/low 32bit ones.
check out: http://now.netapp.com/NOW/cgi-bin/bol?Type=Detail&Display=80268
-- Daniel Leeds Senior Systems Administrator Edmunds.com
-----Original Message----- From: owner-toasters@mathworks.com on behalf of Buerger, Andreas Sent: Thu 6/21/2007 9:05 AM To: toasters@mathworks.com Subject: faulty snmp output?
Hi,
I am just testing with some SNMP on our Filers. During some tests I mentioned something, I can't explain.
The SNMP query dfKBytesTotal returns negative output on some volumes:
snmpget -v 1 -t 30 -Osq -c public FILER
NETWORK-APPLIANCE-MIB::dfKBytesTotal.19 dfKBytesTotal.19 -2071986176 dfKBytesTotal.20 0
The equal command directly issued from the filer returns the following:
ssh FILER df -k VOLUME
Filesystem total used avail capacity Mounted on /vol/VOLUME/ 2222981120KB 2030845132KB 192135988KB 91% /vol/homes02/ /vol/VOLUME/.snapshot 0KB 40077688KB 0KB ---% /vol/homes02/.snapshot
Does anybody have an idea why the snmp output is negative and not same as the df -k from the filer?
Here some information of the test environment:
MIB Version: Version 1.19.3, March 2007 (on filer and localhost) Filer: FAS3050 with OnTap 7.0.2
Best regards Andreas
----------------------------------------- Wincor Nixdorf Int. GmbH WN CIO4 Computing & Storage Heinz-Nixdorf-Ring 1 33106 Paderborn
Phone: +49 5251 693 4215 Fax: +49 5251 693 4200 Mail: andreas.buerger@wincor-nixdorf.com -----------------------------------------
Buerger, Andreas wrote:
Hi,
I am just testing with some SNMP on our Filers. During some tests I mentioned something, I can't explain.
The SNMP query dfKBytesTotal returns negative output on some volumes:
snmpget -v 1 -t 30 -Osq -c public FILER
NETWORK-APPLIANCE-MIB::dfKBytesTotal.19 dfKBytesTotal.19 -2071986176 dfKBytesTotal.20 0
The equal command directly issued from the filer returns the following:
ssh FILER df -k VOLUME
Filesystem total used avail capacity Mounted on /vol/VOLUME/ 2222981120KB 2030845132KB 192135988KB 91% /vol/homes02/ /vol/VOLUME/.snapshot 0KB 40077688KB 0KB ---% /vol/homes02/.snapshot
Does anybody have an idea why the snmp output is negative and not same as the df -k from the filer?
snmp v1 uses 32-bit numbers so you're number is overflowing and displaying as a negative number. You need to use v2 or v3 and also make sure that the counter you're querying is a 64-bit counter. If the device you're querying doesn't support v2 or v3, or doesn't have 64-bit counters for dfKbytes, you're out of luck.
Frank
Here some information of the test environment:
MIB Version: Version 1.19.3, March 2007 (on filer and localhost) Filer: FAS3050 with OnTap 7.0.2
Best regards Andreas
Wincor Nixdorf Int. GmbH WN CIO4 Computing & Storage Heinz-Nixdorf-Ring 1 33106 Paderborn
Phone: +49 5251 693 4215 Fax: +49 5251 693 4200 Mail: andreas.buerger@wincor-nixdorf.com
Hi Andreas,
This is an integer overflow:
A signed, long integer overflows after 2147483647 (= starts to become negative)
Regards, Adrian
Buerger, Andreas 21.06.2007 18:05:
The SNMP query dfKBytesTotal returns negative output on some volumes
Hi Andreas.
dfKBytesTotal is deprecated.
Use OIDs 1.3.6.1.4.1.789.1.5.4.1.14 and .15, dfHighTotalKBytes and dfLowTotalKBytes. Add 2^32 to each snmp-value if the snmp-value is negative. To get total capacity in bytes: dfHighTotalKBytes * 2^32 + dfLowTotalKBytes * 1024
There are some other problems you may encounter when monitoring filers via snmp (apart from the fact that netapp still only supports snmp v1), so if you are planning to roll your own monitoring, have a look at the ManageONTAP™ SDK.
-Cornelius