You are not logged in.

#1 2013-02-14 12:14:12

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Conky and lm_sensors

This is output from sensors:

$ sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1:        3065 RPM
temp1:        +63.0°C  
temp2:        +50.0°C  
temp3:        +41.0°C  
temp4:        +66.0°C  
temp5:        +50.0°C  
temp6:            N/A  
temp7:        +33.0°C  
temp8:            N/A  
temp9:        +46.0°C  
temp10:       +52.0°C  
temp11:       +52.0°C  
temp12:           N/A  
temp13:           N/A  
temp14:           N/A  
temp15:           N/A  
temp16:           N/A  

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +55.0°C  (high = +105.0°C, crit = +105.0°C)
Core 1:       +56.0°C  (high = +105.0°C, crit = +105.0°C)

acpitz-virtual-0
Adapter: Virtual device
temp1:        +63.0°C  (crit = +127.0°C)
temp2:        +56.0°C  (crit = +100.0°C)

Right now, I have this in conky:

${voffset -11}${color green}CPU:${color red} ${hwmon 0 temp 1}${hwmon 0 temp 2}°C / ${hwmon 0 temp 2}°C

and it shows me temperatures of supposedly two cores, but I don't think this is correct. I think the real core1/2 temperatures are in the coretemp-isa-0000 section.

How can I change this conky script to display demperatures of "Core 0" and "Core 1" positions from coretemp-isa-0000?

Offline

#2 2013-02-14 18:25:00

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: Conky and lm_sensors

Check out your /sys/class/hwmon directory, you can find all info you need there.
E.g. cat /sys/class/hwmon/hwmon0/device/temp1_input or  cat /sys/class/hwmon/hwmon0/device/temp1_label.

Offline

#3 2013-02-14 20:25:36

NoSavvy
Member
From: Dorchester, Dorset, UK
Registered: 2013-01-23
Posts: 97

Re: Conky and lm_sensors

${voffset -11}${color green}CPU:${color red} ${execpi 5 sensors | grep "Core 0:" | sed -e 's/.*  +//' | cut -c1-4. You may have to change the '4' in cut to get the right output.

Offline

#4 2013-02-14 23:46:25

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Re: Conky and lm_sensors

NoSavvy wrote:

${voffset -11}${color green}CPU:${color red} ${execpi 5 sensors | grep "Core 0:" | sed -e 's/.*  +//' | cut -c1-4. You may have to change the '4' in cut to get the right output.

That worked a treat.

Is the 'grep' method any more system/interrupt intensive than 'hwmon'?

Offline

#5 2013-02-15 09:45:24

NoSavvy
Member
From: Dorchester, Dorset, UK
Registered: 2013-01-23
Posts: 97

Re: Conky and lm_sensors

#Lockheed

'Sensors' is the command. Grep only extracts the correct text from the 'sensors' output.  'excpi 5' is how often it reads the output, it can be 10,20 50 or whatever.
As to which is more system intensive I can't say.

Offline

Board footer

Powered by FluxBB