[hobbit] 4.2-alpha - disk tests
Henrik Stoerner
henrik at hswn.dk
Mon Apr 10 17:43:01 CEST 2006
On Mon, Apr 10, 2006 at 04:00:34PM +0100, Morris, Chris (Shared Services) wrote:
> Henrik,
>
> Looking at the code in client-config.c module, it looks like the ability to
> test filesystems for absolute block, Kb, Mb or Gb limits rather that just
> %Used is already there, but the hobbit-client.cfg file does not explain how
> to code these tests.
>
> Am I correct, or just don't understand C?
You're reading the code correctly. The problem is you cannot configure
it currently.
The problem I ran into is that I haven't found a way of detecting what
metric is reported in the "df" output that the client reports. Here's
an example:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 99511580 11417684 88093896 12% /
Now, it's ease to figure out that there's 12% used on my / filesystem;
even without the "Use%" column, I could just calculate
(100 x 11417684) / 99511580 = 12
But how can I tell what metric is used for "99511580" and "11417684" ?
The heading does say "1K-blocks", but that varies quite a bit between
the operating systems. At worst, it could be "disk blocks" - often 512
bytes, but one never knows.
Configuring a limit of "yellow at 2 GB free" requires that Hobbit can
interpret the absolute values reported by the client, not just the
relative amount of free space. I don't know if there's a good way of
doing that, except to embed (more) knowledge about the various df's
into Hobbit. And I'm not terribly keen on doing that.
Henrik
More information about the Xymon
mailing list