You are not logged in.

#1 2009-01-27 15:28:04

userlander
Member
Registered: 2008-08-23
Posts: 413

[SOLVED] temperatures in conky

I'm having trouble getting conky to display my CPU temps. sensors says this:

# sensors
it8718-isa-0290
Adapter: ISA adapter
in0:         +1.38 V  (min =  +0.00 V, max =  +4.08 V)   
in1:         +2.13 V  (min =  +0.00 V, max =  +4.08 V)   
in2:         +3.26 V  (min =  +0.00 V, max =  +4.08 V)   
in3:         +2.98 V  (min =  +0.00 V, max =  +4.08 V)   
in4:         +0.70 V  (min =  +0.00 V, max =  +2.10 V)   
in5:         +0.00 V  (min =  +0.00 V, max =  +4.08 V)   ALARM
in6:         +1.49 V  (min =  +0.00 V, max =  +4.08 V)   
in7:         +3.07 V  (min =  +0.00 V, max =  +4.08 V)   
in8:         +3.23 V
fan1:       1216 RPM  (min =   10 RPM)
fan2:       1205 RPM  (min =   10 RPM)
temp1:       -55.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        -2.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:       +31.0°C  (low  = +127.0°C, high = +80.0°C)  sensor = thermal diode
cpu0_vid:   +0.000 V

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +45.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +36.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0002
Adapter: ISA adapter
Core 2:      +37.0°C  (high = +82.0°C, crit = +100.0°C)  

coretemp-isa-0003
Adapter: ISA adapter
Core 3:      +37.0°C  (high = +82.0°C, crit = +100.0°C)

The examples I've seen on the forum (like this excellent post #4 from [vEX])  all show the it87 modules reporting temp1, temp2, temp3, etc. as "Sys temp" or "CPU temp," which then makes it pretty clear. But here I'm guessing 31C is the system/motherboard temp, and that shows up fine with hwmon 0 temp 3 as expected.

But I can't find what is reporting these coretemp-isa values, or how I would get them into conky. I searched through the conky variables page but didn't see anything related to isa or cpu temps  reported this way (coretemp-isa, etc.) The xfce sensors plugin lists them as "coretemp-0" "coretemp-1" etc.  On a whim I tried adding those in with the platform variable (eg: platform it8718 coretemp-isa-0000 (or just coretemp-0, etc.)}), and all kinds of other combinations, but needless to say it didn't work. The it87 directories don't seem to show those values either:

ls /sys/module/it87/drivers/platform:it87/it87.656
alarms         in0_alarm  in2_min    in5_max    modalias     pwm3_freq    temp2_type
bus@           in0_input  in3_alarm  in5_min    name         subsystem@   temp3_alarm
cpu0_vid       in0_max    in3_input  in6_alarm  power/       temp1_alarm  temp3_input
driver@        in0_min    in3_max    in6_input  pwm1         temp1_input  temp3_max
fan1_alarm     in1_alarm  in3_min    in6_max    pwm1_enable  temp1_max    temp3_min
fan1_input     in1_input  in4_alarm  in6_min    pwm1_freq    temp1_min    temp3_type
fan1_min       in1_max    in4_input  in7_alarm  pwm2         temp1_type   uevent
fan2_alarm     in1_min    in4_max    in7_input  pwm2_enable  temp2_alarm  vrm
fan2_input     in2_alarm  in4_min    in7_max    pwm2_freq    temp2_input
fan2_min       in2_input  in5_alarm  in7_min    pwm3         temp2_max
hwmon:hwmon0@  in2_max    in5_input  in8_input  pwm3_enable  temp2_min

Can anyone point me in the right direction?

Last edited by userlander (2009-01-28 14:02:34)

Offline

#2 2009-01-27 15:46:54

Kilz
Member
Registered: 2008-03-01
Posts: 140

Re: [SOLVED] temperatures in conky

did you install lm sensors? The wiki has a good page.
http://wiki.archlinux.org/index.php/Lm_sensors

Last edited by Kilz (2009-01-27 15:48:22)


I trust Microsoft about as far as I can comfortably spit a dead rat.
Cinnamon is a wonderful desktop
"Faith is the substance of things hoped for, the evidence of things not seen."

Offline

#3 2009-01-27 15:59:09

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: [SOLVED] temperatures in conky

Kilz wrote:

did you install lm sensors? The wiki has a good page.
http://wiki.archlinux.org/index.php/Lm_sensors

lm_sensors is reading the temps I posted. tongue

just to clarify: I'm trying to get those temps to display in conky. thanks.

Offline

#4 2009-01-27 16:38:35

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,137

Re: [SOLVED] temperatures in conky

Hi there,
if you happen to be like me and have an AMD processor, the regular conky variables don't seem to be much help.  This is what I ended up putting in my .conkyrc to display my temp.

Temp: ${color lightgrey}${execi 1200 echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000)) deg. C}

Even if you're not running an AMD cpu, you should be able to find something in /sys/bus/pci/drivers/temp_maybe_something_else?? and use a script in conky to list it.  Well, it's a start maybe. smile

EDIT: Actually, I just sat down with my laptop and now I see that for temps with this Intel cpu the temp reading resides in /proc/acpi/thermal_zone/THM0/temperature so it might be there, or somewhere similar, instead.

Last edited by bgc1954 (2009-01-27 19:56:31)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#5 2009-01-27 23:27:14

fphillips
Member
From: Austin, TX
Registered: 2009-01-24
Posts: 202

Re: [SOLVED] temperatures in conky

As bgc said, you can find the values here:

/sys/devices/platform/coretemp.?/temp1_input

they were put there by the coretemp driver in the kernel.

Frank

Offline

#6 2009-01-28 01:29:02

lunch_box
Member
Registered: 2008-10-21
Posts: 16

Re: [SOLVED] temperatures in conky

You could use the execi variable to read the output from sensors:

${execi 30 sensors | grep "Core 0" | cut -d "+" -f2 | cut -c1-6}

The above should display 45.0°C from your sensors output and update it every 30 seconds. You can change the "Core 0" bit for different lines. Probably not the most elegant solution but it works for me.

Last edited by lunch_box (2009-01-28 01:30:25)

Offline

#7 2009-01-28 10:55:00

b0uncyfr0
Member
Registered: 2008-05-11
Posts: 140

Re: [SOLVED] temperatures in conky

Have you guys been getting acuurate readings? I never have  with my Xeon 3110.

Offline

#8 2009-01-28 12:15:45

sparky
Member
From: Minnesota, USA
Registered: 2008-07-29
Posts: 15

Re: [SOLVED] temperatures in conky

I use a similar method to lunch_box above, but as I'm used to temperatures in Fahrenheit, I do a conversion as well...

I also get my fan speeds through a similar means. Both require lm_sensors

TMP0: $alignr ${exec echo "`sensors | grep 'Core 0' | cut -c15-16`*9/5+32"|bc}F
TMP1: $alignr ${exec echo "`sensors | grep 'Core 1' | cut -c15-16`*9/5+32"|bc}F
FANL: $alignr ${exec sensors | grep 'Left' | cut -c13-16}RPM
FANR: $alignr ${exec sensors | grep 'Right' | cut -c13-16}RPM

Offline

#9 2009-01-28 14:02:05

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: [SOLVED] temperatures in conky

lunch_box wrote:

You could use the execi variable to read the output from sensors:

${execi 30 sensors | grep "Core 0" | cut -d "+" -f2 | cut -c1-6}

The above should display 45.0°C from your sensors output and update it every 30 seconds. You can change the "Core 0" bit for different lines. Probably not the most elegant solution but it works for me.

Thanks, like you said, not the most elegant, but at least it works. I just had to change -c1-6 to -c1-4 to get rid of some characters that wouldn't display right. I don't know how you guys figure this stuff out. tongue

I have no /proc/acpi/thermal_zone - maybe you need the thermal module loaded? anyway, I'll just stick with this for now since it's working and not an excessive drain on resources.

Offline

#10 2011-03-24 14:11:49

harden@gsu.edu
Member
Registered: 2011-03-24
Posts: 2

Re: [SOLVED] temperatures in conky

Hi Folks,

I have the coretemp and it87 type chips and was using the method of lunch_box and sparky to get the temps in conky.   After reading fphillips's  post  I started hunting around in /sys/ and playing with .conkrc.  On my box:

${hwmon 0 temp 1} refers to /sys/class/hwmon/hwmon0/device/temp1_input 
and
${hwmon 4 fan 1} refers to /sys/class/hwmon/hwmon4/device/fan4_input

So I now use $hwmon in .conkyrc which should preform a little better than execi and sensors.

sensors

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +59.0°C  (high = +80.0°C, crit = +100.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 3:      +57.0°C  (high = +80.0°C, crit = +100.0°C)  

coretemp-isa-0002
Adapter: ISA adapter
Core 1:      +52.0°C  (high = +80.0°C, crit = +100.0°C)  

coretemp-isa-0003
Adapter: ISA adapter
Core 2:      +53.0°C  (high = +80.0°C, crit = +100.0°C)  
[SNIP]
fan1:       1161 RPM  (min =   10 RPM)
fan4:       2657 RPM  (min =    0 RPM)
[SNIP]

.conkyrc

[SNIP]
color1 F9F966
color2 FF7F50
color3 87CEFF
color4 7FFF00
color5 87CEFA
default_color Chartreuse
default_outline_color Dark Cyan
default_shade_color Dark Cyan
[SNIP]
${color1}CPU0:$color ${cpu cpu0}% ${cpubar cpu0 5,85}${alignr 10}${color2}${hwmon 0 temp 1}$alignr${color1}${cpugraph cpu0 32,120 104E8B FF7F50 -t}
${color1}CPU1:$color ${cpu cpu1}% ${cpubar cpu1 5,85}${alignr 10}${color2}${hwmon 2 temp 1}$alignr${color1}${cpugraph cpu1 32,120 104E8B FF7F50 -t}
${color1}CPU2:$color ${cpu cpu2}% ${cpubar cpu2 5,85}${alignr 10}${color2}${hwmon 3 temp 1}$alignr${color1}${cpugraph cpu2 32,120 104E8B FF7F50 -t}
${color1}CPU3:$color ${cpu cpu3}% ${cpubar cpu3 5,85}${alignr 10}${color2}${hwmon 1 temp 1}$alignr${color1}${cpugraph cpu3 32,120 104E8B FF7F50 -t}
${color1}Fan 1: ${color2}${hwmon 4 fan 1} RPM         ${color1}Fan 4: ${color2}${hwmon 4 fan 4} RPM
[SNIP]

Offline

Board footer

Powered by FluxBB