You are not logged in.

#1 2012-10-05 14:04:22

1LordAnubis
Member
Registered: 2008-10-10
Posts: 250
Website

[Solved] Can't get proper cpu temp/ Conky

What I want: the 'proper' CPU temp displayed in conky
The CPU: AMD Bulldozer, 6 core (FX-6100)

sensors output:

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       27.43 W  (crit =  95.01 W)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +10.2°C  (high = +70.0°C)
                       (crit = +90.0°C, hyst = +87.0°C)

Now, if I understand correctly, it's saying that my temperature is 10.2°C ; this is incorrect. I have the ability of reading the correct, believable temperature in the bios, which is usually ~35C (95F)

I stuck ${execi 10 sensors | grep ^temp1 | tail -n 1 |awk '{print $2}'} in conky, and upon login, for an instant lo and behold it displayed the correct temperature (37C), and after a second went to the usual ~10.0C

Well... when looking at my sensors output, something else looked a bit odd... it seems the proportion of the power1 value of the crit value is equal to my 'proper' temperature.
In other words, if i goto my sensors output, and do (95.01/27.43)*10.2 , I get 35.33 C (95.6F)... the 'proper' temperature...

When I do cat /sys/module/k10temp/drivers/pci\:k10temp/0000\:00\:18.3/temp1_input, on the other hand, the value seems to have no correlation with the temperature whatsoever at around 10500

Is it supposed to display temp1 as a proportion of the power usage to max usage?
How can I get out this info, and put it in conky?

Thanks

Last edited by 1LordAnubis (2012-10-08 21:24:44)


Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

#2 2012-10-05 14:23:25

Gusar
Member
Registered: 2009-08-25
Posts: 3,452

Re: [Solved] Can't get proper cpu temp/ Conky

Why are you using all sorts of apps piped together instead of conky's built-in hwmon functionality? You're not the first one I see with this, but it's just crazy. However, in your case that will show the same thing as the sensors output, which is 10 degrees. /sys shows the same info too btw, in your example 10.5 degrees.

So your problem is not in the display of info, it's that the kernel modules (fam15h_power and k10temp) don't give you the stuff you're interested in. Why that is I don't know, it's been a while since I had AMD hardware.

Offline

#3 2012-10-08 21:22:01

1LordAnubis
Member
Registered: 2008-10-10
Posts: 250
Website

Re: [Solved] Can't get proper cpu temp/ Conky

Well, I found thanks to someone over at crunchbang that if I do sensors-detect, there is an unadulterated temp1 value toward the bottom.... and it seems to be the correct cpu temp. So now I have

${execi 1 sensors | grep ^temp1 | tail -n 1 |awk '{print ($2*9)/5+32}'} F

, which seems to work

new sensors output:

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +16.0°C  (high = +70.0°C)
                       (crit = +90.0°C, hyst = +87.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       53.79 W  (crit =  95.01 W)

it8721-isa-0290
Adapter: ISA adapter
in0:          +2.81 V  (min =  +1.64 V, max =  +1.42 V)  ALARM
in1:          +2.76 V  (min =  +0.59 V, max =  +0.68 V)  ALARM
in2:          +0.98 V  (min =  +1.61 V, max =  +1.82 V)  ALARM
+3.3V:        +3.36 V  (min =  +2.76 V, max =  +2.57 V)  ALARM
in4:          +1.85 V  (min =  +1.74 V, max =  +1.54 V)  ALARM
in5:          +2.51 V  (min =  +0.59 V, max =  +0.78 V)  ALARM
in6:          +0.00 V  (min =  +0.34 V, max =  +1.02 V)  ALARM
3VSB:         +0.00 V  (min =  +2.45 V, max =  +2.16 V)  ALARM
Vbat:         +3.38 V  
fan1:        1388 RPM  (min =   80 RPM)
fan2:        2109 RPM  (min =  532 RPM)
fan3:           0 RPM  (min =   39 RPM)  ALARM
temp1:        +34.0°C  (low  =  +0.0°C, high =  +0.0°C)  ALARM  sensor = thermistor
temp2:        +30.0°C  (low  = +43.0°C, high = +45.0°C)  sensor = thermistor
temp3:       -128.0°C  (low  = -30.0°C, high = +64.0°C)  sensor = disabled
intrusion0:  OK

Last edited by 1LordAnubis (2012-10-08 21:24:11)


Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

#4 2012-10-08 21:35:29

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,836
Website

Re: [Solved] Can't get proper cpu temp/ Conky

So, isn't the output you are looking for 34.0°C?

awk '/^fan3/ { flag=1; next } /^temp2/ {flag=0} flag { print +$2 }'

Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#5 2012-10-08 21:47:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,975

Re: [Solved] Can't get proper cpu temp/ Conky

jasonwryan wrote:

So, isn't the output you are looking for 34.0°C?

awk '/^fan3/ { flag=1; next } /^temp2/ {flag=0} flag { print +$2 }'

Jason, you live in a civilized part of the word in which they use SI measurements.  tongue
His conversion to F looks correct
--Eric


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#6 2012-10-08 21:52:43

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,836
Website

Re: [Solved] Can't get proper cpu temp/ Conky

ewaller wrote:
jasonwryan wrote:

So, isn't the output you are looking for 34.0°C?

awk '/^fan3/ { flag=1; next } /^temp2/ {flag=0} flag { print +$2 }'

Jason, you live in a civilized part of the word in which they use SI measurements.  tongue
His conversion to F looks correct
--Eric

LOL. I wondered what that F was on the end of the string.
Turn out, in my case, it stands for FAIL tongue


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#7 2012-10-09 08:23:28

Gusar
Member
Registered: 2009-08-25
Posts: 3,452

Re: [Solved] Can't get proper cpu temp/ Conky

And again I'll point out that conky has built-in hwmon functionality which is much more efficient than piping several shell apps together.

${hwmon 2 temp 1}

Adjust the numbers until you get the sensor you want. Once you have it, add factor and offset to convert to Fahrenheit:

${hwmon 2 temp 1 1.8 32}

Or possibly conky will convert itself if you set the "temperature_unit" option. It's all in the documentation: http://conky.sourceforge.net/variables.html, http://conky.sourceforge.net/config_settings.html

Last edited by Gusar (2012-10-09 08:24:23)

Offline

Board footer

Powered by FluxBB