calculating available disk space

This is a discussion on calculating available disk space within the SNMP Users forums, part of the Networking and Network Related category; Hello, I'm trying to use the "disk" directive in snmpd.conf to monitor available diskspace. I'm ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-15-2006
H. McManus
 
Posts: n/a
Default calculating available disk space

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=...720&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/...net-snmp-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:52 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0