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