Greetings fellow net-snmp'ers. I have found sound interesting behavior with the hrStorage table for which I'm seeking commentary. Turns out that when mount points change dynamically, there is a problem with how the hrStorage table reports these mount points. The following scenario describes my problem:

An initial walk of the hrStorage tree returns the following data on my box [relevant part copied]:
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /home
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /db
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /var/lib/nfs/rpc_pipefs
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /home/dana/mnt/cittio
HOST-RESOURCES-MIB::hrStorageDescr.12 = STRING: /fc4

so let's play with fc4 since it's not doing anything important on my box. Unmounting /fc4 results in the following walk results:
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /home
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /db
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /var/lib/nfs/rpc_pipefs
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /home/dana/mnt/cittio

so far so good. the removal of the mount point /fc4 is correctly reflected in the new results.  Now let's add another mountpoint and examine the results:
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /home
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /db
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /var/lib/nfs/rpc_pipefs
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /home/dana/mnt/cittio
HOST-RESOURCES-MIB::hrStorageDescr.13 = STRING: /home/dana/mnt/chimera

hold on here, Charlie! what happened to the table entry at index=12? Of course it was removed, but shouldn't the new mount point take position 12? Let's now examine what happens when we remount /fc4... one would think that since index 12 was skipped, it would be re-inserted at position 12, so let's take a look at the results:
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /home
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /db
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /var/lib/nfs/rpc_pipefs
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /home/dana/mnt/cittio
HOST-RESOURCES-MIB::hrStorageDescr.13 = STRING: /home/dana/mnt/chimera

huh. /fc4 doesn't show up at all. but wait... not only do you get the potato peeler, you ALSO get the tomato slicer because if I now unmount the previously mounted entry (chimera), guess what shows up? You got it...
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /sys
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /proc/bus/usb
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /home
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /db
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /var/lib/nfs/rpc_pipefs
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /home/dana/mnt/cittio
HOST-RESOURCES-MIB::hrStorageDescr.12 = STRING: /fc4

and there it is again. This behavior leads me to believe that there is a bug in the hrStorage code that is not indicative of a system problem, but rather the hrStorage code itself dealing with the list management of the mount points. I haven't yet examined the code (being a rather green net-snmp coder) but possibly someone else has run into this behavior before. Perhaps it should be entered as a bug but I'd like a confirmation before doing so.

Thanks for wading through this lengthy little problem I'm seeing.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
  • [no subject] Dana Heath
    • Re: Dave Shield
      • RE: Dana Heath
        • Re: Thomas Anders
      • RE: Dana Heath
        • Re: Dave Shield

Reply via email to