About SNMP

Simple Network Management Protocol (SNMP) is a network device management and reporting protocol that returns static and dynamic data from a target device in a directory tree style. NetScanTools Pro SNMP-Core includes two tools to traverse or 'WALK' the tree and obtain values from each level of the tree. The left side path to the value can be presented three ways: numeric OID format, short format with MIB name followed by shortened reference or fully qualified human readable format.

HOST-RESOURCES-MIB is defined in RFC 2790.

NetScanTools Pro can accept input OIDs in any of these three forms (you must have MIBs available to translate the first two formats, numeric will always work and is recommended for research).

objectID (OID) in shortened format for retrieving a single data item
HOST-RESOURCES-MIB::hrSystemUptime

objectID (OID) in fully qualified human readable format suitable for traversing a large tree
.iso.org.dod.internet.mgmt.mib-2.host

objectID (OID) in numeric format suitable for traversing a large tree
.1.3.6.1.2.1.25

How to retrieve data using SNMP - Core Tool

How to retrieve data from the complete HOST-RESOURCES-MIB tree from a Cisco Call Manager using the NetScanTools Pro SNMP-Core Tool.
  1. Press Settings. These are recommended settings. You may need to vary timeout and retries if your device 'times out' and does not return all the data you expect.

    SNMP Core Settings
  2. Close Settings by pressing OK and enter your target IP address or hostname.
  3. Enter the numeric OID .1.3.6.1.2.1.25 in the objectID (OID) entry area.
  4. Enter the Community Name (password for SNMPv1/v2c).
  5. Select WalkBulk (for lower bandwidth, alternative is to use Walk) from the dropdown Select SNMP Action menu.
  6. Press Perform Action.

Interpreting the Host Resources MIB Data

All of the following data is from a single Cisco Call Manager virtual machine except as noted where we refer to similar data from a 32 bit Windows workstation.

The first block you will see is the System data. It shows how long the system has been up, the system date and time, the number of users, the current number of processes and the maximum number of processes the system can support.

HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (882608828) 102 days, 3:41:28.28
HOST-RESOURCES-MIB::hrSystemDate.0 = STRING: 2014-11-18,15:23:3.0,-8:0
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 0
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 1108
HOST-RESOURCES-MIB::hrSystemMaxProcesses.0 = INTEGER: 4080

This line show the amount of memory in the system – 6 gigabytes.

HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 6097272 Kbytes

In a Windows 32 bit system, the response is similar, in this case the system shows 3 gigabytes:

HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 3274836 Kbytes

hrMemorySize is the first item in the Host Resources Storage Group. It is followed by a Storage Table that shows the logical storage areas of the device including hard drives, removable drives, virtual and physical memory and other types of storage.

Interpreting the Host Resources Storage Table

The Storage Table consists of 7 columns: hrStorageIndex, hrStorageType, hrStorageDescr, hrStorageAllocationUnits, hrStorageSize, hrStorageUsed, hrStorageAllocationFailures.

The SNMP results below show the rows within that table.

HtStorageIndex – note the .1, .2, .3 after the hrStorageIndex indicates the row number in the table.

HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2
HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3
...
HOST-RESOURCES-MIB::hrStorageIndex.17 = INTEGER: 17
HOST-RESOURCES-MIB::hrStorageIndex.18 = INTEGER: 18

The hrStorageType column shows these rows. Note the different types of storage. These types are enumerated in the HOST-RESOURCES-TYPES MIB, also part of RFC 2790.

HOST-RESOURCES-MIB::hrStorageType.1 = OID: HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.5 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.6 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.7 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.8 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.9 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.10 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.11 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.12 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.13 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.14 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.15 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.16 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.17 = OID: HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.18 = OID: HOST-RESOURCES-TYPES::hrStorageOther

The next column shows the descriptions for each storage device. In this case we are looking at a Cisco Call Manager Virtual Machine.

HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical RAM
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Virtual Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /proc
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /dev/pts
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /grub
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /partB
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /common
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /dev/shm
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /proc/sys/fs/binfmt_misc
HOST-RESOURCES-MIB::hrStorageDescr.12 = STRING: /var/log/ramfs/cm/trace/ccm/sdi
HOST-RESOURCES-MIB::hrStorageDescr.13 = STRING: /var/log/ramfs/cm/trace/ccm/sdl
HOST-RESOURCES-MIB::hrStorageDescr.14 = STRING: /var/log/ramfs/cm/trace/ccm/calllogs
HOST-RESOURCES-MIB::hrStorageDescr.15 = STRING: /var/log/ramfs/cm/trace/ccm/dntrace
HOST-RESOURCES-MIB::hrStorageDescr.16 = STRING: /var/log/ramfs/cm/trace/lbm/sdl
HOST-RESOURCES-MIB::hrStorageDescr.17 = STRING: /var/log/ramfs/cm/trace/cti/sdi
HOST-RESOURCES-MIB::hrStorageDescr.18 = STRING: /var/log/ramfs/cm/trace/cti/sdl

In a Windows machine, the storage device descriptions are similar and may be more familiar to you.

HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\ Label: Serial Number f47f024d
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: D:\
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: E:\
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: F:\ Label:second Serial Number 54ab5877
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: G:\ Label:New Volume Serial Number e8e577ae
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: H:\ Label:PATRIOT Serial Number 86046a54
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: J:\
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: Virtual Memory
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: Physical Memory

How to Calculate Used and Free Space on a Storage Device

From this point on we will concentrate on only the first three items from the Cisco Call Manager HOST-RESOURCES-MIB information.

The allocation units show the byte count in an allocation unit on the storage device. The number 4096 is commonly seen, but other sizes may appear.

HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 4096 Bytes

The hrStorageSize column shows the count of hrStoragetAllocationUnits for the storage device.

HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 1524318
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 507878
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 4991243

To calculate the total bytes for the storage device, multiply hrStorageSize X hrStorageAllocationUnits.

HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 1524318 x 4096 = 6243606528 (6 gigabytes of Physical Ram – see hrStorageDescr.1)
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 507878 x 4096 = 2080268288 (2 gigabytes of Virtual Memory)
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 4991243 x 4096 = 20444131328 (20 gigabyte hard drive)

To find out how much storage has been used on each storage device, first obtain the storage size from above, then multiply hrStorageUsed x hrStorageAllocationUnits and subtract it from the storage size.

HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 662703 x 4096 = 2714431488 (2.7 gigbytes of ram used)
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 26 x 4096 = 106496 (100k of virtual memory used)
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 2916092 x 4096 = 11944312832 (11.9 gigabytes of hard drive used)

Analysis of Storage Usage for this Device

Physical RAM usage:
2.7GG used / 6GG total x 100 = 43.5% used or 56.5% free

Virtual Storage usage:
100KB used / 2GB total x 100 = 0.0005% used or effectively 100% free

Hard Drive usage:
11.9GB used / 20GB total x 100 = 58.4% used or 41.6% free