I've got a small cluster running Ubuntu 12.04 LTS on all of the nodes. I recently set up ganglia to monitor the cluster, and it's working beautifully except for one issue. I wanted to add a CPU temperature metric to the monitor, so I created a 'temps' function in /usr/local/bin/ that consists of the following line:
sensors|grep temp$1|awk '{print $2}'|grep -o '[0-9.]\+'
I then added the following lines to my crontab to update the temperature every 2 minutes:
*/2 * * * * /usr/bin/gmetric --name temp1 --value `/usr/local/bin/temps 1` --type int16 --units Celcius
*/2 * * * * /usr/bin/gmetric --name temp2 --value `/usr/local/bin/temps 2` --type int16 --units Celcius
After setting this up, I noticed that the temperature isn't ever changing. It reports 27.8 for temp1 and 29.8 for temp2 all of the time. This is what 'sensors' is reporting regardless of the load on the machine. Here's the full output from 'sensors':
root@NUCTest:~# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +106.0°C)
temp2: +29.8°C (crit = +106.0°C)
What am I missing here? Thanks.
sensors-detect
and answered yes to the question about adding the lines to /etc/modules. I think I selected the default of no the first time through. Now I get a much more complete output fromsensors
that includes non-virtual devices.