[collectd] Proposed patch to extend sensors plugin

Florian Forster octo at verplant.org
Sun Nov 5 15:32:57 CET 2006


Hi Lubos,

I finally got around to take a look at your sensors patch. I've made
some changes, but mostly fixed indentation and broke some lines. I've
renamed `filename_format' and `sensor_filename_format' to
`old_filename_format' and `extended_filename_format', respectively.
Also, the plugin now uses `strcmp' rather than `strncmp' when searching
the known types, since `strncmp' is counterproductive here.

I'll likely reorder the list, too, so it's ordered like this:
  fan1, in1, temp1, [...], fan2, in2, temp2, ...
The reason being speedup: fan1, in1 and temp1 are likely to appear in
the features list, while `temp9' is seldom implemented.

Another solution would be to go back to `strncmp' and only put `fan',
`temp', `in', etc in the list. I think a temperature named `fan?' is
unlikely enough to do it like this.

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/20061105/c16b8037/attachment.pgp


More information about the collectd mailing list