[collectd] df plugin and statfs/statvfs
Florian Forster
octo at collectd.org
Fri Mar 11 23:57:08 CET 2011
Hi,
On Fri, Mar 11, 2011 at 05:14:40PM -0500, Martin B. Smith wrote:
> Would you think that a reasonable behavior when mount points are
> explicitly given in the config would be that they shouldn't be checked
> against getmntent? Or that statvfs() should be called before
> getmntent() and then again after? I'd be happy to provide a patch
> either way.
the way this currently works is that the mount points configured are an
"ignore list", i.e. you can put "/foobar" in there and it won't complain
if such a directory doesn't exist. It merely black / white lists mount
points (depending on the "IgnoreSelected" setting).
Wouldn't it be an easy solution to simply mount the NFS share on the
machine? Why go through all the trouble of involving automount?
If you want to implement this, I'd suggest to introduce a new
'ForceMountPoint "/foo"' setting which can be repeated to add multiple
directories. The plugin would then behave like this:
for each <mount point> in [force mount point]
get and submit stats;
for each <mount point> in getmntent()
if <mount point> is in [force mount point]
has already been handled, ignore;
else
proceed as-is (i.e. check the three ignore lists and possibly
query and submit the values).
Does this sound reasonable to you? Since the directory given isn't
necessarily a mount point, maybe "ForceDirectory" would be a better
name. What do you think?
Best regards,
—octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2567 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110311/9ab7ee29/attachment-0001.bin>
More information about the collectd
mailing list