snmpwalk for the hrstorage table for a system with large number of mountpoints is too slow. This is caused by the overhead of the getmntent() calls used to fetch the details of the /etc/mnttab entries in Init_HR_FileSys() in hr_filesys.c. For systems with large number of mounted file systems, the overhead was too much, for instance for a system with 3000 mounts, a snmpwalk for hrStorage used to take around 20 mins.
The attached patch fixes the issue by maintaining a cache of all the /etc/mnttab entries and walk through the cache instead of opening /etc/mnttab and walking all the entries for each mountpoint.
Log in to post a comment.