{"id":222,"date":"2011-06-02T08:31:27","date_gmt":"2011-06-02T15:31:27","guid":{"rendered":"http:\/\/www.sysop.ca\/?p=222"},"modified":"2018-10-01T06:30:25","modified_gmt":"2018-10-01T13:30:25","slug":"graph-freebsd-cpu-temps-with-ganglia","status":"publish","type":"post","link":"http:\/\/www.sysop.ca\/?p=222","title":{"rendered":"Graph FreeBSD cpu temps with ganglia"},"content":{"rendered":"<p>Just a quick post, here&#8217;s a simple script to inject FreeBSD cpu temps into Ganglia. I&#8217;ve only tested this in FreeBSD 8.x so I&#8217;m not sure if the sysctl calls are there for the older versions. Also you&#8217;ll need to kldload the coretemp module, I put the following in my \/boot\/loader.conf<\/p>\n<p><code>coretemp_load=\"YES\"<\/code><\/p>\n<p><code>#!\/bin\/sh<br \/>\n# Freebsd gmetric CPU temp<\/p>\n<p>CPU0TEMP=`sysctl dev.cpu.0.temperature |awk -F ':' '{print $2}'|cut -f1 -d 'C'`<br \/>\n\/usr\/local\/bin\/gmetric --conf=\/usr\/local\/etc\/gmond.conf --name=CPU0Temp --value=$CPU0TEMP --type=uint16 --units=\"Celsius\"<br \/>\n<\/code><\/p>\n<p>Obviously there&#8217;s room for improvement, for example this only graphs your CPU 0. You can repeat this for as many CPU&#8217;s as your system has. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a quick post, here&#8217;s a simple script to inject FreeBSD cpu temps into Ganglia. I&#8217;ve only tested this in FreeBSD 8.x so I&#8217;m not sure if the sysctl calls are there for the older versions. Also you&#8217;ll need to kldload the coretemp module, I put the following in my \/boot\/loader.conf coretemp_load=&#8221;YES&#8221; #!\/bin\/sh # Freebsd &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.sysop.ca\/?p=222\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Graph FreeBSD cpu temps with ganglia&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=222"}],"version-history":[{"count":4,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":423,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/222\/revisions\/423"}],"wp:attachment":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}