Hello, I'm trying to use the "disk" directive in snmpd.conf to monitor available diskspace.
I'm a little confused though at how it goes about calculating the percentages. For example: I have the line "disk / 95%" in snmpd.conf (the number is very high to make it easy for the event to trigger). Using dd, I've been creating files to fill up the harddrive to try and work out at what point net-snmp sees the available space fall below 95%. The problem is that dskErrorFlag isn't being set until the available space falls to approx 90%. I can see why it's happening, but I don't quite understand why. I think the free percentage is being calculated by doing percentAvail = 100 - (dskUsed/dskTotal) * 100 Doing it this way gives you a completely different result to doing percentAvail = dskAvail/dskUsed * 100 This is because the values for dskAvail + dskUsed != dskTotal The data below shows how much I had to fill the harddrive before the errorflag tripped to on - it didn't trip until the free space was down to 90% (as calculated by avail/total). Is this the intended behaviour or is there something weird going on? For the time being I've sent disk to trip at an absolute Kb value, but I would prefer it to work on percentages. dskEntry.dskTotal.1 = INTEGER: 74975192 dskEntry.dskAvail.1 = INTEGER: 67771760 dskEntry.dskUsed.1 = INTEGER: 3394824 dskEntry.dskPercent.1 = INTEGER: 5 dskEntry.dskPercentNode.1 = INTEGER: 0 dskEntry.dskErrorFlag.1 = INTEGER: 1 I hope this makes sense... Helen. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users