You are not logged in.

#1 2007-04-27 08:31:39

cry0x
Member
Registered: 2007-04-11
Posts: 91

Conky and lm_sensors

I've installed lm_sensors in an attempt to get some nice CPU temperature readings and have conky display them.  So far I've gotten the first part done.

Looking at the output given in sensors,

k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
             +35°C
Core1 Temp:
             +35°C

adt7463-i2c-1-2e
Adapter: SMBus nForce2 adapter at 1c40
V1.5:      +0.000 V  (min =  +0.00 V, max =  +3.32 V)   
VCore:     +0.006 V  (min =  +0.00 V, max =  +2.99 V)   
V3.3:      +2.196 V  (min =  +0.00 V, max =  +4.38 V)   
V5:       +0.000 V  (min =  +0.00 V, max =  +6.64 V)   
V12:      +0.000 V  (min =  +0.00 V, max = +15.94 V)   
CPU_Fan:      0 RPM  (min =    0 RPM)                     
fan2:         0 RPM  (min =    0 RPM)                     
fan3:         0 RPM  (min =    0 RPM)                     
fan4:        -1 RPM  (min =    0 RPM)                     
CPU Temp: +28.00°C  (low  =  -127°C, high =  +127°C)       
Board Temp:
          +37.25°C  (low  =  -127°C, high =  +127°C)      
Remote Temp:
          +42.00°C  (low  =  -127°C, high =   +80°C)       
CPU_PWM:    82
Fan2_PWM:  255
Fan3_PWM:  255
vid:      +0.000 V  (VRM Version 2.4)

It looks like "k8temp" is displaying the proper temperatures.

Telling conky which sensor to use and in which way to use it is where I'm failing. I've looked at the examples "adding adt746xcpu to .rconkyrc will display the CPU temperature from therm_adt746x" but I'm not sure to carry the example over to k8temp.

Any help would be greatly appreciated smile


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#2 2007-04-27 10:29:28

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Conky and lm_sensors

You have to map it against it's node in /sys/bus/i2c/devices/<device-number here>/<file>.

A small example;
.conkyrc:

${color grey}Temperatures:
${color grey}CPU:$color ${i2c 9191-0290 temp 2}°C ${color grey}Case:$color ${i2c 9191-0290 temp 1}°C ${color grey}NB:$color ${i2c 9191-0290 temp 3}°C

/sys/bus/i2c/devices/9191-0290/<files>:

$ cat /sys/bus/i2c/devices/9191-0290/temp1_input
32000

$ cat /sys/bus/i2c/devices/9191-0290/temp2_input
27500

$ cat /sys/bus/i2c/devices/9191-0290/temp3_input
41000

sensors output:

$ sensors
w83627ehf-isa-0290
Adapter: ISA adapter
<snip>
Sys Temp:    +32°C  (high =   -17°C, hyst =  +121°C) 
CPU Temp:  +27.5°C  (high = +80.0°C, hyst = +75.0°C) 
AUX Temp:  +41.0°C  (high = +80.0°C, hyst = +75.0°C)

Does this help to you see how it works?

Last edited by [vEX] (2007-04-27 10:31:01)


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

#3 2007-04-27 18:13:01

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

Yeah I also can't figure out how to get conky to display the k8temp temperatures. I asked about this once on the conky-devel mailing list but nobody every replied. I think part of the problem is in the fact that k8temp is not an i2c device, its a pci device. I have no devices in my i2c/devices folder. Does anybody have any ideas here? Thanks.

Offline

#4 2007-04-27 18:41:53

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Conky and lm_sensors

Did you check conky's variables?

Conky can display temperature by itself just fine. You don't need lm_sensors, just conky.  And temperature stuff in /proc/acpi.

Last edited by B (2007-04-27 18:45:16)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2007-04-27 18:46:38

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

Yeah I checked conky's variables, and unless I missed something conky can't display the k8temp temperatures. What kind of processor are you using? If it uses the k8temp how did you get conky to display the temps? Thanks.

Offline

#6 2007-04-27 20:23:29

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Conky and lm_sensors

I have a Turion ML-32.

From the Conky Variables page:

acpitemp        ACPI temperature in C. 
acpitempf        ACPI temperature in F.

Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2007-04-28 08:11:20

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Conky and lm_sensors

daedalusman wrote:

Yeah I also can't figure out how to get conky to display the k8temp temperatures. I asked about this once on the conky-devel mailing list but nobody every replied. I think part of the problem is in the fact that k8temp is not an i2c device, its a pci device. I have no devices in my i2c/devices folder. Does anybody have any ideas here? Thanks.

/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input
/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp3_input

those give the correct values for the temperatures of core0 and core1. I'm not sure how to add this info to conky though.


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#8 2007-04-28 08:14:38

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Conky and lm_sensors

B wrote:

I have a Turion ML-32.

From the Conky Variables page:

acpitemp        ACPI temperature in C. 
acpitempf        ACPI temperature in F.

And where is acpi getting these temperatures? AMD was generous enough to provide my Athlon X2 with a temp sensor on each core. Any other sensor or reading would not be as accurate.


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#9 2007-04-28 19:35:40

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

cry0x wrote:
daedalusman wrote:

Yeah I also can't figure out how to get conky to display the k8temp temperatures. I asked about this once on the conky-devel mailing list but nobody every replied. I think part of the problem is in the fact that k8temp is not an i2c device, its a pci device. I have no devices in my i2c/devices folder. Does anybody have any ideas here? Thanks.

/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input
/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp3_input

those give the correct values for the temperatures of core0 and core1. I'm not sure how to add this info to conky though.

Yeah, I was able to find these when I first got this new cpu. I even provided this information when I e-mailed the conky-devel list but like I said no one every responded to that and there was never any change of the code for support of this. Maybe I will bug them agian and try and get this fixed.

Also, are you sure those are for the two cores I get 31C for one and 24C for the other, this makes me think one is for the cpu and the other is for the system ambient temp. Maybe I'm wrong here but why would the two core differ by so much? What do they say of your temps? Thanks for the reply.

Last edited by daedalusman (2007-04-28 19:39:14)

Offline

#10 2007-04-30 07:52:16

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Conky and lm_sensors

daedalusman wrote:
cry0x wrote:
daedalusman wrote:

Yeah I also can't figure out how to get conky to display the k8temp temperatures. I asked about this once on the conky-devel mailing list but nobody every replied. I think part of the problem is in the fact that k8temp is not an i2c device, its a pci device. I have no devices in my i2c/devices folder. Does anybody have any ideas here? Thanks.

/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input
/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp3_input

those give the correct values for the temperatures of core0 and core1. I'm not sure how to add this info to conky though.

Yeah, I was able to find these when I first got this new cpu. I even provided this information when I e-mailed the conky-devel list but like I said no one every responded to that and there was never any change of the code for support of this. Maybe I will bug them agian and try and get this fixed.

Also, are you sure those are for the two cores I get 31C for one and 24C for the other, this makes me think one is for the cpu and the other is for the system ambient temp. Maybe I'm wrong here but why would the two core differ by so much? What do they say of your temps? Thanks for the reply.

The two values for me are never more than 1 degree C apart.


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#11 2007-04-30 18:15:24

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

B wrote:

Did you check conky's variables?

Conky can display temperature by itself just fine. You don't need lm_sensors, just conky.  And temperature stuff in /proc/acpi.

Yeah, I have nothing in that folder so that option is a no go.

Offline

#12 2007-04-30 19:35:08

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Conky and lm_sensors

[stijn@hephaistos ~]$ cat /proc/acpi/thermal_zone/THRM/temperature 
temperature:             46 C

You don'thave anything like that?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#13 2007-05-01 00:17:34

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

B wrote:
[stijn@hephaistos ~]$ cat /proc/acpi/thermal_zone/THRM/temperature 
temperature:             46 C

You don'thave anything like that?

No there is nothing in my thermal_zone folder, it's completely empty.

Offline

#14 2007-05-01 06:52:42

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Conky and lm_sensors

Okay. The 'acpitemp' variable of Conky uses those data to display temperature. You could write a little script to parse the output from lm_sensors (using grep & cut for example) and have Conky run that, so you can get your temperature anyway smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#15 2007-05-01 22:17:22

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

I could if I knew anything about writing scripts. Maybe this would be a good time to start learning, I think after finals are done I will get on that. Thanks for the help.

Offline

#16 2007-05-02 01:07:05

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Conky and lm_sensors

Here is a bit of shell code which will spit out the temp in degrees celcius for a given sensor, as reported by k8temp

#!/bin/bash
echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000))

I don't have conky installed and haven't used it in a while but something like this might work:

${execi 5 /path/to/script.sh}

Note that I divide by 1000 in the script because the raw values from temp1_input show up as 32000 for 32C on my PC. You might need to adjust this.

Offline

#17 2007-05-02 01:31:42

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Conky and lm_sensors

dmartins wrote:

Here is a bit of shell code which will spit out the temp in degrees celcius for a given sensor, as reported by k8temp

#!/bin/bash
echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000))

I don't have conky installed and haven't used it in a while but something like this might work:

${execi 5 /path/to/script.sh}

Note that I divide by 1000 in the script because the raw values from temp1_input show up as 32000 for 32C on my PC. You might need to adjust this.

I hadn't thought of this. Works like a charm big_smile


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#18 2007-05-03 00:56:09

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

dmartins wrote:

Here is a bit of shell code which will spit out the temp in degrees celcius for a given sensor, as reported by k8temp

#!/bin/bash
echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000))

I don't have conky installed and haven't used it in a while but something like this might work:

${execi 5 /path/to/script.sh}

Note that I divide by 1000 in the script because the raw values from temp1_input show up as 32000 for 32C on my PC. You might need to adjust this.

Thanks for this, will give it a try and let you know of any troubles, greatly appreciated.

Offline

#19 2007-05-03 07:51:48

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Conky and lm_sensors

You're welcome big_smile
Yes, please let me know if you run into any problems. I'm running an Abit KN9 motherboard with a Brisbane (the low power version of the 64 x2) processor and it isn't exactly supported by the motherboard's BIOS yet. My core temp readings are currently 2 and 3 degrees celcius tongue So this isn't exactly tested on a working setup, although I think it should work fine *fingers crossed*

Last edited by dmartins (2007-05-03 07:54:41)

Offline

#20 2007-07-17 17:21:59

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

dmartins wrote:

You're welcome big_smile
Yes, please let me know if you run into any problems. I'm running an Abit KN9 motherboard with a Brisbane (the low power version of the 64 x2) processor and it isn't exactly supported by the motherboard's BIOS yet. My core temp readings are currently 2 and 3 degrees celcius tongue So this isn't exactly tested on a working setup, although I think it should work fine *fingers crossed*

Hey, sorry for such a late reply but I was quite busy and then kinda forgot about this. Just wanted to let you know that your script works perfectly. Here is a screenshot to show it in action.

http://www.deviantart.com/deviation/60007413/

Thanks for this, it is greatly appreciated.

Offline

#21 2007-07-17 23:30:24

cry0x
Member
Registered: 2007-04-11
Posts: 91

Re: Conky and lm_sensors

daedalusman wrote:
dmartins wrote:

You're welcome big_smile
Yes, please let me know if you run into any problems. I'm running an Abit KN9 motherboard with a Brisbane (the low power version of the 64 x2) processor and it isn't exactly supported by the motherboard's BIOS yet. My core temp readings are currently 2 and 3 degrees celcius tongue So this isn't exactly tested on a working setup, although I think it should work fine *fingers crossed*

Hey, sorry for such a late reply but I was quite busy and then kinda forgot about this. Just wanted to let you know that your script works perfectly. Here is a screenshot to show it in action.

http://www.deviantart.com/deviation/60007413/

Thanks for this, it is greatly appreciated.

That's a beautiful setup, mind sharing your conkyrc?


Who is this doin' this synthetic type of alpha beta psychedelic funkin'?

Offline

#22 2007-07-27 16:04:30

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: Conky and lm_sensors

cry0x wrote:
daedalusman wrote:
dmartins wrote:

You're welcome big_smile
Yes, please let me know if you run into any problems. I'm running an Abit KN9 motherboard with a Brisbane (the low power version of the 64 x2) processor and it isn't exactly supported by the motherboard's BIOS yet. My core temp readings are currently 2 and 3 degrees celcius tongue So this isn't exactly tested on a working setup, although I think it should work fine *fingers crossed*

Hey, sorry for such a late reply but I was quite busy and then kinda forgot about this. Just wanted to let you know that your script works perfectly. Here is a screenshot to show it in action.

http://www.deviantart.com/deviation/60007413/

Thanks for this, it is greatly appreciated.

That's a beautiful setup, mind sharing your conkyrc?

Hey, sorry for the such a late reply but I've been busy with school and kinda forgot. Anyways, I got the config and scripts from here...

http://www.gnome-look.org/content/show. … tent=58555

I made some changes but that is the original so I that I should post that. Hope this helps, have fun with.

Offline

#23 2007-10-11 13:23:49

[vEX]
Member
From: Sweden
Registered: 2006-11-23
Posts: 450

Re: Conky and lm_sensors

dmartins wrote:

Here is a bit of shell code which will spit out the temp in degrees celcius for a given sensor, as reported by k8temp

#!/bin/bash
echo $(($(cat /sys/bus/pci/drivers/k8temp/0000\:00\:18.3/temp1_input) / 1000))

I don't have conky installed and haven't used it in a while but something like this might work:

${execi 5 /path/to/script.sh}

Note that I divide by 1000 in the script because the raw values from temp1_input show up as 32000 for 32C on my PC. You might need to adjust this.

With the Conky 1.4.7 there is 'hwmon' which is similiar to 'i2c'. Your script can be replaced with the following:

${hwmon <hwmon #, if more than one> <what input> <#>}

To figure out which hwmon # you want look in /sys/class/hwmon/, I got both k8temp and w83627ehf loaded so I got two entries in there, hwmon0 and hwmon1. This is how I read the temperatures from hwmon1 (which is w83627ehf for me) in Conky:

Temperatures:
 CPU: ${hwmon 1 temp 2}°C Case: ${hwmon 1 temp 1}°C NB: ${hwmon 1 temp 3}°C

I was previously the 'i2c' function, but with kernel 2.6.23 the 'i2c-isa' interface/module has been removed.


PC: Antec P182B | Asus P8Z77-V PRO | Intel i5 3570k | 16GB DDR3 | GeForce 450GTS | 4TB HDD | Pioneer BDR-207D | Asus Xonar DX | Altec Lansing CS21 | Eizo EV2736W-BK | Arch Linux x86_64
HTPC: Antec NSK2480 | ASUS M3A78-EM (AMD 780G) | AMD Athlon X3 425 | 8GB DDR2 | GeForce G210 | 2TB HDD | Arch Linux x86_64
Server: Raspberry Pi (model B) | 512MB RAM | 750GB HDD | Arch Linux ARM

Offline

Board footer

Powered by FluxBB