snmpwalk of the hrStorageIndex OIDs can take 5 to 20 minutes on systems with thousands of mounts (Doc ID 1402565.1)

Last updated on JULY 29, 2016

Applies to:

Solaris Operating System - Version 10 3/05 to 10 1/13 U11 [Release 10.0]
Information in this document applies to any platform.

Symptoms

On a Solaris 10 system running SMA's snmpd a snmpwalk of the hrStorageIndex, or a walk of the entire OID tree that would include those OIDs, the snmpwalk could take 5 to 20+ minutes to complete on systems with thousands of mounts in the /etc/mnttab file.

For example the command would be:

$ /usr/sfw/bin/snmpwalk -v2c -c public localhost hrStorage


The output which would begin to display slowly to the shell session if the command was run on the system itself, ie., localhost, would be OID information such as the following:

HOST-RESOURCES-MIB::hrStorageIndex.61 = INTEGER: 61
HOST-RESOURCES-MIB::hrStorageIndex.62 = INTEGER: 62
HOST-RESOURCES-MIB::hrStorageIndex.65 = INTEGER: 65
HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.5 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.6 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
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


To determine the number of mounts  in the /etc/mnttab the following command can be run:

# cat /etc/mnttab | wc -l


The numerical value returned will be the number of mounts present on the system.

Truss data collected from snmpd would reveal many statvfs() system calls such as the following:

26223/1: 941.4502 0.0002 0.0001 statvfs("/poolz05/zones/qa0002m1/root/etc/mnttab", 0xFFFFFFFF7FFF7E30) = 0
26223/1: 941.6045 0.0002 0.0002 statvfs("/poolz05/zones/qa0002m1/root/system/object", 0xFFFFFFFF7FFF7E30) = 0
26223/1: 941.7564 0.0001 0.0001 statvfs("/poolz05/zones/qa0002m1/root/etc/svc/volatile", 0xFFFFFFFF7FFF7E30) = 0
26223/1: 941.9246 0.0001 0.0001 statvfs("/poolz05/zones/qa0002m1/root/tmp", 0xFFFFFFFF7FFF7E30) = 0
26223/1: 942.0875 0.0002 0.0001 statvfs("/poolz05/zones/qa0002m1/root/var/run", 0xFFFFFFFF7FFF7E30) = 0


Further truss data collected with more in depth and intensive library option (-u::) reveals a large number of ioctl() calls with a specific option:

26223/1: 142.5720 0.0002 0.0001 open("/etc/mnttab", O_RDONLY) = 19
26223/1: 142.5881 0.0161 0.0160 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5883 0.0002 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5884 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5886 0.0002 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5888 0.0002 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5889 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5890 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5891 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5891 0.0000 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5892 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF75F8) = 0
26223/1: 142.5893 0.0001 0.0000 ioctl(19, MNTIOC_GETMNTENT, 0xFFFFFFFF7FFF76C8) = 0
26223/1: 142.5894 0.0001 0.0000 statvfs("/var/run", 0xFFFFFFFF7FFF7E30) = 0
26223/1: bsize=8192 frsize=8192 blocks=12657369 bfree=12657231
26223/1: bavail=12657231 files=37554490 ffree=37539002 favail=37539002
26223/1: fsid=0x5280003 basetype=tmpfs namemax=255
26223/1: flag=ST_NOTRUNC
26223/1: fstr="/var/run"



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms