snmpbulkget mismatch??

"yuchen lu" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello everyone,

I've been working on a project which uses netsnmp to monitor the backend
systems. However I found out that the returned data had been mismatched
whenever it's retriving information from hrStorageTable. Following is what i
entered on the command:

 "snmpbulkget -v2c -c amail 4.4.4.31 hrStorageIndex hrStorageType
hrStorageDescr hrStorageSize hrStorageUsed"

and the following is what bulkget returned, notice *index 6*:

HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrStorageType.1 = OID:
HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 1034416
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 1011584
HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3
HOST-RESOURCES-MIB::hrStorageType.3 = OID:
HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 5227372
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 1104976
HOST-RESOURCES-MIB::hrStorageIndex.6 = INTEGER: 6
HOST-RESOURCES-MIB::hrStorageType.6 = OID:
HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: Memory buffers
HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 115452
HOST-RESOURCES-MIB::hrStorageUsed.10 = INTEGER: 93392
HOST-RESOURCES-MIB::hrStorageIndex.7 = INTEGER: 7
HOST-RESOURCES-MIB::hrStorageType.7 = OID:
HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: Cached memory
HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 679732
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 1499489
HOST-RESOURCES-MIB::hrStorageIndex.8 = INTEGER: 8
HOST-RESOURCES-MIB::hrStorageType.8 = OID:
HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: Shared memory
HOST-RESOURCES-MIB::hrStorageSize.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.32 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.10 = INTEGER: 10
HOST-RESOURCES-MIB::hrStorageType.10 = OID:
HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space
HOST-RESOURCES-MIB::hrStorageSize.10 = INTEGER: 4192956
HOST-RESOURCES-MIB::hrStorageUsed.33 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.31 = INTEGER: 31
HOST-RESOURCES-MIB::hrStorageType.31 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /
HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 2579465
HOST-RESOURCES-MIB::hrStorageUsed.34 = INTEGER: 11375
HOST-RESOURCES-MIB::hrStorageIndex.32 = INTEGER: 32
HOST-RESOURCES-MIB::hrStorageType.32 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.32 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageSize.32 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.35 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.33 = INTEGER: 33
HOST-RESOURCES-MIB::hrStorageType.33 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.33 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageSize.33 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.36 = INTEGER: 20946
HOST-RESOURCES-MIB::hrStorageIndex.34 = INTEGER: 34
HOST-RESOURCES-MIB::hrStorageType.34 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageSize.34 = INTEGER: 101086
HOST-RESOURCES-MIB::hrStorageUsed.37 = INTEGER: 5490265

It seems that bulkget has automatically shift "hrStorageUsed" upwards by
three positions. It looks like that it couldn't get the usage information
for the device type "hrStorageOther", but I suppose "null" or "0" should be
returned instead or "hrStorageOther" devices should be filtered out. I think
there are must someone out there encountered this problem before, please
give me some suggestions. Thanks in advance!!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.