hrFSAccess is inaccurate/laggy

Kelly Price <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKzFY7S0Q+C3WkNs0SbSi0Q5MF8XHGEiP856xduj0J4q_izhwA@mail.gmail.com>
I'm working on monitoring the read only status of Linux file systems
at work... and... It's not going as expected.

For instance, on a remote RHEL 6.1 system with Net:SNMP 5.5 installed,
remount a file system read-only (like /boot), then walk
.1.3.6.1.2.1.25.3.8.1 .  hrFSAccess reports readOnly(2) for the file
system.  Then remount it read-write, and walk it again.   Wait an hour
and walk it a third time.

hrFSAccess reports it as readOnly(2) when it's readWrite.

A bit more detail.  I've already toggled it on a test system, cp0126.
Here's what happens when I walk it from a remote system, scl2.  I get
the same results if I walk it off of cp0126:

[em7admin@scl2 ~]$  snmpwalk -v1 -c REDACTED cp0126  .1.3.6.1.2.1.25.3.8.1
HOST-RESOURCES-MIB::hrFSIndex.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrFSIndex.5 = INTEGER: 5
HOST-RESOURCES-MIB::hrFSIndex.6 = INTEGER: 6
HOST-RESOURCES-MIB::hrFSMountPoint.1 = STRING: "/"
HOST-RESOURCES-MIB::hrFSMountPoint.5 = STRING: "/dev/shm"
HOST-RESOURCES-MIB::hrFSMountPoint.6 = STRING: "/boot"
HOST-RESOURCES-MIB::hrFSRemoteMountPoint.1 = ""
HOST-RESOURCES-MIB::hrFSRemoteMountPoint.5 = ""
HOST-RESOURCES-MIB::hrFSRemoteMountPoint.6 = ""
HOST-RESOURCES-MIB::hrFSType.1 = OID: HOST-RESOURCES-TYPES::hrFSLinuxExt2
HOST-RESOURCES-MIB::hrFSType.5 = OID: HOST-RESOURCES-TYPES::hrFSOther
HOST-RESOURCES-MIB::hrFSType.6 = OID: HOST-RESOURCES-TYPES::hrFSLinuxExt2
HOST-RESOURCES-MIB::hrFSAccess.1 = INTEGER: readWrite(1)
HOST-RESOURCES-MIB::hrFSAccess.5 = INTEGER: readWrite(1)
HOST-RESOURCES-MIB::hrFSAccess.6 = INTEGER: readOnly(2)
HOST-RESOURCES-MIB::hrFSBootable.1 = INTEGER: true(1)
HOST-RESOURCES-MIB::hrFSBootable.5 = INTEGER: false(2)
HOST-RESOURCES-MIB::hrFSBootable.6 = INTEGER: false(2)
HOST-RESOURCES-MIB::hrFSStorageIndex.1 = INTEGER: 31
HOST-RESOURCES-MIB::hrFSStorageIndex.5 = INTEGER: 35
HOST-RESOURCES-MIB::hrFSStorageIndex.6 = INTEGER: 36
HOST-RESOURCES-MIB::hrFSLastFullBackupDate.1 = STRING: 0-1-1,0:0:0.0
HOST-RESOURCES-MIB::hrFSLastFullBackupDate.5 = STRING: 0-1-1,0:0:0.0
HOST-RESOURCES-MIB::hrFSLastFullBackupDate.6 = STRING: 0-1-1,0:0:0.0
HOST-RESOURCES-MIB::hrFSLastPartialBackupDate.1 = STRING: 0-1-1,0:0:0.0
HOST-RESOURCES-MIB::hrFSLastPartialBackupDate.5 = STRING: 0-1-1,0:0:0.0
HOST-RESOURCES-MIB::hrFSLastPartialBackupDate.6 = STRING: 0-1-1,0:0:0.0

And yet...

root@cp0126 [~]# mount
/dev/mapper/vg_cp0000-lv_root on / type ext4
(rw,usrjquota=quota.user,jqfmt=vfsv0)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

root@cp0126 [~]# cat /etc/system-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)

root@cp0126 [~]# cat /proc/mounts
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
devtmpfs /dev devtmpfs
rw,seclabel,relatime,size=1952088k,nr_inodes=488022,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,seclabel,relatime 0 0
/dev/mapper/vg_cp0000-lv_root / ext4
rw,seclabel,relatime,barrier=1,data=ordered,jqfmt=vfsv0,usrjquota=quota.user
0 0
none /selinux selinuxfs rw,relatime 0 0
devtmpfs /dev devtmpfs
rw,seclabel,relatime,size=1952088k,nr_inodes=488022,mode=755 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
/dev/sda1 /boot ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
/etc/auto.misc /misc autofs
rw,relatime,fd=7,pgrp=1816,timeout=300,minproto=5,maxproto=5,indirect
0 0
-hosts /net autofs
rw,relatime,fd=13,pgrp=1816,timeout=300,minproto=5,maxproto=5,indirect
0 0

If I restart snmpd, it reads the file system RW... but once it goes
RO, it stays RO.

Is this a bug in an old version of Net-snmp?  I don't have access to a
current version.

-- 
Kelly "STrRedWolf" Price
http://redwolf.ws


_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.