19/09/2005
collectd multiple sensor patch
Collectd is a very nice program that runs in the background and gathers statistics about various kind of stuff like cpu load , disk activity, memory ,fan speed, temperatures, etc, and then puts them all in nice rrd files. It even has a set of scripts to create the graphs. I had only one problem though, but it was fixable.
Collectd includes sensor.h from lm_sensor package that contains all the functions about your working temperature/fan sensors. It works fine if you only use 1 sensor. But I use 2!
it87-isa-0290
Adapter: ISA adapter
CPU core: +1.78 V (min = +1.66 V, max = +1.84 V)
DDRAM: +1.31 V (min = +1.17 V, max = +1.33 V)
3v3 I/O: +3.22 V (min = +3.14 V, max = +3.47 V)
+5V: +5.09 V (min = +4.76 V, max = +5.26 V)
+12V: +12.42 V (min = +11.39 V, max = +12.61 V)
-12V: -11.47 V (min = -7.17 V, max = -16.76 V)
-5V: -4.03 V (min = -2.48 V, max = -10.02 V)
Stdby: +5.09 V (min = +4.76 V, max = +5.26 V)
CPU Fan: 4166 RPM (min = 1599 RPM, div = 4)
BOX Fan: 1506 RPM (min = 897 RPM, div = 8 )
IT87 T°: +37°C (low = +15°C, high = +55°C) sensor = thermistorlm90-i2c-0-4c
Adapter: SMBus Via Pro adapter at 5000
LM90 T°: +47°C (low = +15°C, high = +60°C)
Athlon T°:
+53.5°C (low = +15.0°C, high = +70.0°C)
LM90 Crit: +70°C (hyst = +60°C)
CPU Crit: +80°C (hyst = +70°C)
As you can see I use both it87 and lm90 to get correct results. Collectd creates its rrd databases inside /var/lib/collectd. The sensor rrd file it creates are in the form:
sensors-fan1.rrd
sensors-fan2.rrd
sensors-fan3.rrd
sensors-temp1.rrd
sensors-temp2.rrd
sensors-temp3.rrd
That means it can’t distinguish the different chipsets and overwrites the values if you have 2 chipsets. What I did was patch collectd to rename the rrd files in order to include the sensor name as well. I now have:
sensors-it87-fan1.rrd
sensors-it87-fan2.rrd
sensors-it87-fan3.rrd
sensors-it87-temp1.rrd
sensors-it87-temp2.rrd
sensors-it87-temp3.rrd
sensors-lm90-temp1.rrd
sensors-lm90-temp2.rrd
The patch is here: Collectd-multi-sensor.patch.gz
Just apply the patch inside the src dir , recompile and install.
I am in doubt whether I should contact the author or not about this simple patch…anyway…If you use collectd and have more than 1 sensor running…tell me if it works for you…
cheers!
Filed by kargig at 22:13 under Linux
No Comments | 2,827 views