Figure out memory usage using SNMP on Windows Figure out memory usage using SNMP on Windows windows windows

Figure out memory usage using SNMP on Windows


Try 1.3.6.1.2.1.25.2.3.1. I received the following results with Net-SNMP's snmpwalk utility from one of our Windows Server 2003 servers:

$ snmpwalk -v1 -cpublic 10.200.80.221 1.3.6.1.2.1.25.2.3.1.3HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\ Label:  Serial Number 38728140HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: D:\HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: O:\ Label:Data  Serial Number b618c4bcHOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: Q:\ Label:Quorum  Serial Number 4cbbcc74HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: Virtual MemoryHOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: Physical Memory$ snmpwalk -v1 -cpublic 10.200.80.221 1.3.6.1.2.1.25.2.3.1.4HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 BytesHOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 0 BytesHOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 4096 BytesHOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 4096 BytesHOST-RESOURCES-MIB::hrStorageAllocationUnits.5 = INTEGER: 65536 BytesHOST-RESOURCES-MIB::hrStorageAllocationUnits.6 = INTEGER: 65536 Bytes$ snmpwalk -v1 -cpublic 10.200.80.221 1.3.6.1.2.1.25.2.3.1.5HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 17911195HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 0HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 66794245HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 35836990HOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 128101HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 98266$ snmpwalk -v1 -cpublic 10.200.80.221 1.3.6.1.2.1.25.2.3.1.6HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 1365706HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 0HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 38290HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 17637HOST-RESOURCES-MIB::hrStorageUsed.5 = INTEGER: 4819HOST-RESOURCES-MIB::hrStorageUsed.6 = INTEGER: 6952

What is important here are the 5th and 6th rows of the tables. If you have fewer hard disks then you can find the values of virtual and physical memory in other rows.


You may either report this as a bug to Microsoft and wait for a fix, or simply switch to another agent.

Microsoft prefers WMI to SNMP, so you should know the agent is only a second class citizen on Windows.