Hi, attached you find a patch to make the sensors plugin use the sensor labels from the label statement in the lm-sensors configuration.
Regards, Jakob -- ceterum censeo microsoftem esse delendam.
From 54759739bf240b2f46d53507c3a0f37a63989722 Mon Sep 17 00:00:00 2001 From: Jakob Haufe <[email protected]> Date: Tue, 9 Feb 2010 19:06:37 +0100 Subject: [PATCH] Use sensor labels (description) from lm-sensors --- src/sensors.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sensors.c b/src/sensors.c index 8391346..943c7b6 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -560,8 +560,11 @@ static int sensors_read (void) if (status < 0) continue; - sstrncpy (type_instance, fl->feature->name, - sizeof (type_instance)); + /* get sensor label (description) from lm_sensors */ + char *sensor_label; + sensor_label = sensors_get_label(fl->chip, fl->feature); + sstrncpy(type_instance, sensor_label, sizeof(type_instance)); + if (fl->feature->type == SENSORS_FEATURE_IN) type = "voltage"; -- 1.6.6.1
signature.asc
Description: PGP signature
_______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
