[collectd] [PATCH] Linux ACPI thermal zone plugin
Florian Forster
octo at verplant.org
Thu Jun 12 10:39:46 CEST 2008
Hi Michał,
On Wed, Jun 11, 2008 at 11:38:14PM +0200, Michał Mirosław wrote:
> I updated the patch basing on your suggestions.
thanks for you changes, I've put your plugin into the Git repository :)
> You probably can use the 'walk_directory()' function in other plugins.
There are a couple of plugins reading directories, so they could be
changed to use it.. If you want, you can put `walk_directory()' into
common.c and change the directory reading plugins to use it.. The
following files use `readdir' right now:
-- 8< --
octo at huhu:~/collectd $ grep -rlI readdir src
src/configfile.c
src/battery.c
src/nfs.c
src/plugin.c
src/processes.c
src/vserver.c
src/thermal.c
-- >8 --
The NFS plugin is a false hit, I think. It collects the number of
`readdir' operations on the file system ;)
> And it would be useful to have some standard functions to use in
> config callback like boolean entry parser
That could be implemented as a macro in common.h:
#define OPT_IS_TRUE(str) ((strcasecmp ((str), "true") == 0) \
|| (strcasecmp ((str), "yes") == 0) \
|| (strcasecmp ((str), "on") == 0))
#define OPT_IS_FALSE(str) ((strcasecmp ((str), "false") == 0) \
|| (strcasecmp ((str), "no") == 0) \
|| (strcasecmp ((str), "off") == 0))
> or common ignorelist entry names/parser.
Sorry, I don't know what you mean by that..?
Best 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/20080612/14e9785b/attachment.pgp
More information about the collectd
mailing list