Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 107076 | Differences between
and this patch

Collapse All | Expand All

(-)collectd-2.1.0/src/sensors.c (-4 / +4 lines)
Lines 11-17 Link Here
11
11
12
featurelist_t *first_feature = NULL;
12
featurelist_t *first_feature = NULL;
13
13
14
static char *filename_format = "sensors-%s.rrd";
14
static char *filename_format = "sensors-%s-%s.rrd";
15
15
16
static char *ds_def[] =
16
static char *ds_def[] =
17
{
17
{
Lines 103-114 Link Here
103
		sensors_cleanup ();
103
		sensors_cleanup ();
104
}
104
}
105
105
106
void sensor_update_rrd (const char *feat_name, double value)
106
void sensor_update_rrd (const char *chip_name, const char *feat_name, double value)
107
{
107
{
108
	char filename[128];
108
	char filename[128];
109
	char buffer[128];
109
	char buffer[128];
110
110
111
	if (snprintf (filename, 128, filename_format, feat_name) < 1)
111
	if (snprintf (filename, 128, filename_format, chip_name, feat_name) < 1)
112
		return;
112
		return;
113
113
114
	if (snprintf (buffer, 128, "N:%.3f", value) < 1)
114
	if (snprintf (buffer, 128, "N:%.3f", value) < 1)
Lines 127-133 Link Here
127
		if (sensors_get_feature (*feature->chip, feature->data->number, &value) < 0)
127
		if (sensors_get_feature (*feature->chip, feature->data->number, &value) < 0)
128
			continue;
128
			continue;
129
129
130
		sensor_update_rrd (feature->data->name, value);
130
		sensor_update_rrd (feature->chip->prefix, feature->data->name, value);
131
	}
131
	}
132
132
133
	return (0);
133
	return (0);

Return to bug 107076