0

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.

  • Err... that is a "Virtual device" you sure is a real sensor? BTW, what version of Ubuntu are you using? – Braiam Nov 8 '13 at 18:56
  • Good call Braiam. That got me thinking. I re-ran 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 from sensors that includes non-virtual devices. – KevinC Nov 9 '13 at 2:09
1

I figured it out thanks to some direction from Braiam's comment on my original question. I re-ran 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 from sensors that includes non-virtual devices. Here's what I'm getting out now:

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)

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +35.0°C  (high = +87.0°C, crit = +105.0°C)
Core 0:         +33.0°C  (high = +87.0°C, crit = +105.0°C)
Core 1:         +36.0°C  (high = +87.0°C, crit = +105.0°C)

nct6776-isa-0a30
Adapter: ISA adapter
Vcore:         +0.65 V  (min =  +0.00 V, max =  +1.74 V)
in1:           +1.00 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:          +3.36 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3V:         +3.34 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:           +1.06 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:           +0.00 V  (min =  +0.00 V, max =  +0.00 V)
3VSB:          +3.33 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
Vbat:          +3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:            0 RPM  (min =    0 RPM)  ALARM
fan2:         3183 RPM  (min =    0 RPM)  ALARM
SYSTIN:        +65.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:        +36.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = diode
AUXTIN:        +87.0°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor
PECI Agent 0:  +29.0°C  
cpu0_vid:     +2.050 V
intrusion0:   ALARM
intrusion1:   ALARM

It's interesting that the virtual device is still there. I'd love to learn what that actually is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.