{"id":150,"date":"2005-09-19T22:13:52","date_gmt":"2005-09-19T19:13:52","guid":{"rendered":"https:\/\/void.gr\/kargig\/blog\/?p=150"},"modified":"2005-09-19T22:14:03","modified_gmt":"2005-09-19T19:14:03","slug":"collectd-multiple-sensor-patch","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2005\/09\/19\/collectd-multiple-sensor-patch\/","title":{"rendered":"collectd multiple sensor patch"},"content":{"rendered":"<p><a href=\"http:\/\/verplant.org\/collectd\/\">Collectd<\/a> 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.<\/p>\n<p>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! <\/p>\n<blockquote><p> it87-isa-0290<br \/>\nAdapter: ISA adapter<br \/>\nCPU core:  +1.78 V  (min =  +1.66 V, max =  +1.84 V)<br \/>\nDDRAM:     +1.31 V  (min =  +1.17 V, max =  +1.33 V)<br \/>\n3v3 I\/O:   +3.22 V  (min =  +3.14 V, max =  +3.47 V)<br \/>\n+5V:       +5.09 V  (min =  +4.76 V, max =  +5.26 V)<br \/>\n+12V:     +12.42 V  (min = +11.39 V, max = +12.61 V)<br \/>\n-12V:     -11.47 V  (min =  -7.17 V, max = -16.76 V)<br \/>\n-5V:       -4.03 V  (min =  -2.48 V, max = -10.02 V)<br \/>\nStdby:     +5.09 V  (min =  +4.76 V, max =  +5.26 V)<br \/>\nCPU Fan:  4166 RPM  (min = 1599 RPM, div = 4)<br \/>\nBOX Fan:  1506 RPM  (min =  897 RPM, div = 8 )<br \/>\nIT87 T\u00c2\u00b0:    +37\u00b0C  (low  =   +15\u00b0C, high =   +55\u00b0C)   sensor = thermistor   <\/p>\n<p>lm90-i2c-0-4c<br \/>\nAdapter: SMBus Via Pro adapter at 5000<br \/>\nLM90 T\u00c2\u00b0:    +47\u00b0C  (low  =   +15\u00b0C, high =   +60\u00b0C)<br \/>\nAthlon T\u00c2\u00b0:<br \/>\n           +53.5\u00b0C  (low  = +15.0\u00b0C, high = +70.0\u00b0C)<br \/>\nLM90 Crit:   +70\u00b0C  (hyst =   +60\u00b0C)<br \/>\nCPU Crit:    +80\u00b0C  (hyst =   +70\u00b0C)                   <\/p>\n<\/blockquote>\n<p>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: <\/p>\n<blockquote><p>sensors-fan1.rrd<br \/>\nsensors-fan2.rrd<br \/>\nsensors-fan3.rrd<br \/>\nsensors-temp1.rrd<br \/>\nsensors-temp2.rrd<br \/>\nsensors-temp3.rrd\n<\/p><\/blockquote>\n<p>That means it can&#8217;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:<\/p>\n<blockquote><p>sensors-it87-fan1.rrd<br \/>\nsensors-it87-fan2.rrd<br \/>\nsensors-it87-fan3.rrd<br \/>\nsensors-it87-temp1.rrd<br \/>\nsensors-it87-temp2.rrd<br \/>\nsensors-it87-temp3.rrd<br \/>\nsensors-lm90-temp1.rrd<br \/>\nsensors-lm90-temp2.rrd\n<\/p><\/blockquote>\n<p>The patch is here: <a href='http:\/\/void.gr\/kargig\/blog\/wp-content\/sensors.c.patch.gz' title=''>Collectd-multi-sensor.patch.gz<\/a><br \/>\nJust apply the patch inside the src dir , recompile and install.<\/p>\n<p>I am in doubt whether I should contact the author or not about this simple patch&#8230;anyway&#8230;If you use collectd and have more than 1 sensor running&#8230;tell me if it works for you&#8230;<\/p>\n<p>cheers!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-150","post","type-post","status-publish","format-standard","hentry","category-linux"],"aioseo_notices":[],"views":3357,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=150"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/150\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}