[mrtg] SNMP (once again)
Ashley M. Kirchner
ashley at pcraft.com
Wed Dec 27 01:09:42 MET 2000
Ok, next question:
Using net-snmp, I have the following OIDs:
.1.3.6.1.2.1.25.2.3.1.5.1 -> total partition size (in 4K blocks)
.1.3.6.1.2.1.25.2.3.1.6.1 -> currently used blocks (in 4K blocks)
So, how do I write my config file to make this messed up formula:
100 / (total / (current + (total * 0.05)) => % of disk used
Let me explain the formula:
As most of us know, on a Unix system, 5% of every partition is
reserved. When you look at 'df', it reports the amount used, which
INCLUDES that 5%:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 3035920 2084072 797628 73% /
100 / (3035920 / 2084072) -> 68% (real usage)
100 / (3035920 / (2084072 + (3035920 * 0.05)) -> 73% (real + reserv)
I need to figure that out using the above OIDs in my config script.
Anyone want to take a swing at that? (or tell me a better OID to use,
although I didn't see any)
[NOTE: I knew there was a reason for me to write disk usage stats
using a raw perl script which read in 'df' results - heh]
AMK4
--
W |
| I haven't lost my mind; it's backed up on tape somewhere.
|____________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashley M. Kirchner <mailto:ashley at pcraft.com> . 303.442.6410 x130
SysAdmin / Websmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . eFax 248.671.0909
http://www.pcraft.com . 3550 Arapahoe Ave #6
.................. . . . . Boulder, CO 80303, USA
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list