Hi Patrik,

On Thu, Oct 01, 2009 at 01:57:10PM +0200, Patrik Weiskircher wrote:
> diff --git a/src/df.c b/src/df.c

thanks for your patch :)

Looking at the `struct statvfs' just now I noticed that we don't handle
blocks reserved for root separately. I'll probably write a patch
allowing the user to enable a separation here in a backwards compatible
fashion.

Patrik, could you change the inode code to do this right from the start
so we don't need all this backwards compatibility business? I think the
best way would be to change the "df_inodes" type from
> +df_inodes               used:GAUGE:0:1125899906842623, 
> free:GAUGE:0:1125899906842623
to
   df_inodes value:GAUGE:0:U
(spare the maximum - we don't have any counters involved so if we
subtract carefully no wraparound will happen ;)

Then calculate used space correctly:
  if ((statbuf.f_ffree < statbuf.f_favail)
      || (statbuf.f_files < statbuf.f_ffree))
    continue;
  df_inodes_norm_free = statbuf.f_favail;
  df_inodes_resv_free = statbuf.f_ffree - statbuf.f_favail;
  df_inodes_used      = statbuf.f_files - statbuf.f_ffree;

That'd be great ;) I've already pushed your patch to the master branch,
so you can start from there.

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to