[collectd] Proposed patch to extend sensors plugin
Luboš Staněk
lubek at users.sourceforge.net
Sun Nov 5 17:32:43 CET 2006
Hi Florian,
I have revised your changes.
Well done.
I accept all.
Florian Forster napsal(a):
> 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.
Yes.
> Also, the plugin now uses `strcmp' rather than `strncmp' when searching
> the known types, since `strncmp' is counterproductive here.
>
Good.
> 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.
>
It would speed up the initialization.
Good.
> 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.
>
It would work only for "fan" and "temp" and maybe "in". Other labels are
almost unpredictable because they depend on the HW manufacturer's
terminology. It would require to split search part to two, one for
simple labels and the other for a finite list of the rest. And we would
pray that the label would not be like "temp_cpu".
I am for the full finite list sorted by frequency of the occurrence with
an occasional check of the lm_sensors config. We cannot foresee labels
like "AIN1". The lm_sensor's driver author can introduce any insane
label without a cup of coffee in the morning (judged according to myself).
I have only one change or addition for the documentation, of course you
could check it as it is not my native language:
collectd.conf.in:
------------------------
## with previous naming and .rrd files,
## see collectd.conf(5) for detailed information.
+## It is required if more than one sensor chip of the same
+## type is present. Otherwise you would collect stats for both
+## chips into one set of files.
##
# ExtendedSensorNaming true
------------------------
collectd.conf.pod:
------------------------
the B<DataDir> directory and without previous history. You can rename
previous RRD files to the new ones to continue collecting data into the
same
RRDs.
+
+It is required if more than one sensor chip of the same
+type is present. Otherwise you would collect stats for both
+chips into one set of files.
If not set or set to I<false>, the extended naming is not active. Sensors
get names like I<chip-feature> (e.g. I<it8712-in1>) and RRD files
------------------------
I am sorry for the included patches. I am working on being fluent in git
all the time. I have been able to "rebase" ls/sensors recently. :)
BTW Do you use "vim" for edits? My editor brakes indentation.
Best regards,
Lubos
More information about the collectd
mailing list