[collectd] fscache Patch

Florian Forster octo at verplant.org
Fri May 1 19:03:27 CEST 2009


Hi Edward,

thanks for your patch ;)

On Thu, Apr 30, 2009 at 12:28:34AM -0500, Edward Konetzko wrote:
> Tried to submit the patch via "git send-mail" but I don't think it
> worked if you already have the patch disregard the attachment.

No, I didn't receive a previous mail.

> Looking forward to your feedback, I am sure there are a few issues its
> been a few years since I programmed in C. I have been running this in
> my test lab at work for a few days now with no issues.  
> 
> With 62 metrics I would like to modify the code to group them by their
> classification and possibly add configuration support.  If the changes
> are finished this weekend is it ok to send an updated patch?

The code parsing the file's content was a bit hard to read. I've
replaced it with a - hopefully - simpler version, it'd be great if you
could give it a try since I don't have Linux 2.6.30 here.. You can find
the plugin in either the `master' or `collectd-4.7' branch of the
repository.

I've also changed the data layout so that the “section” (the key at the
beginning of each line) is used as plugin instance. So you'll end up
with files like:
  hostname/fscache-Allocs/fscache_stat-ok

I think adding the possibility to select data to be collected by the
`section' or possibly that second key (`ok' in the above example) would
be a good idea. We have this functionality in src/utils_ignorelist.h.
It's probably easy to add if you follow the example of another file
which implements something like it. If you think selecting single values
would be nice to have, the best example to follow is probably the
`protocols' plugin in src/protocols.c.

I don't know if this is desirable or not, but those value-names (such
as `n' or `ok' or `wt') seem awfully short and hard to understand. Would
it make sense to translate those to something more meaningful? The
downside I'm currently seeing is that then those names wouldn't
correspond to the Kernel docs anymore..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090501/f5aa8304/attachment.pgp 


More information about the collectd mailing list