Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1272 Fix for host resources on Solaris (getmntent) for swap filesystems

backport-needed
open
nobody
None
5
2014-01-06
2014-01-06
John Daniels
No

net-snmp version: 5.7.2

While migrating our Solaris monitoring to net-snmp, I noticed that /etc/svc/volatile was being caught but /tmp was not making it to the output. It seems that for getmntent method of gathering the information, duplicate mnt_special names in mnttab cause subsequent mnttab entries with the same mnt_special to get ignored. The only case I've seen where this can happen so far is with /etc/svc/volatile and user added swap tmpfs.

As a solution, for entries with the swap mnt_special, I overwrite the mnt_special to be the mount point.

Tested on Solaris 9 where /tmp is mounted like this in vfstab:
swap - /tmp tmpfs - yes size=2048m

I don't think there is any reason why you couldn't universally use the mnt_mountp as the unique identifier in the lists as opposed to mnt_special.

1 Attachments

Discussion