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?
Regards,
Chris
The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited.
If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither RWE npower nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any).
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
Henrik Stoerner ha scritto:
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
mmmm.... can you put a configuration line for this? hda_blocks=1024 (or 512)....
-- Roberto Tagliaferri Responsabile Progettazione & Produzione TosNet s.r.l. - Internet Service Provider r.tagliaferri at tosnet.it www.tosnet.it
participants (3)
-
CHRIS.MORRIS@RWEnpower.com
-
henrik@hswn.dk
-
r.tagliaferri@tosnet.it