How to detect processor correct temperature in conky
Solution 1:
Temperature from command line
To find out the temperature, use:
# Ivybridge Intel i7-3630QM
$ cat /sys/class/thermal/thermal_zone*/temp
69000
69000
67000
# Skylake Intel i7-6700HQ using paste after zone names
$ paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t
INT3400 Thermal 20000
SEN1 53000
SEN2 49000
SEN3 53000
SEN4 55000
pch_skylake 70000
B0D4 47000
x86_pkg_temp 48000
Temperature with Conky
Within conky
the system variable I used to monitor an Ivy Bridge CPU is:
${hwmon 2 temp 1}°C
To monitor a Skylake CPU I initially used:
${hwmon 0 temp 1}°C
A few months later (possibly due to new kernel) on the same Skylake CPU I switched to:
${hwmon 1 temp 1}°C
The display looks like this:
Solution 2:
I found that this worked for me:
${platform coretemp.0 temp 1}
This reads the temperature info from /sys/devices/platform/coretemp.0/temp1_input
.
Solution 3:
Another possible solution is:
${exec cat /sys/devices/platform/coretemp.0/temp1_input | cut -c-2 }
or if that doesn't work:
${exec cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input | cut -c-2 }
Solution 4:
Another possible solution is:
$(exec sensors | grep 'Package id' | awk '{print $4}')
Output:
+33.0°C
Solution 5:
${exec sensors | grep 'Package id' | awk '{print $4}'}
Sensors CPU: ${exec sensors | grep 'Package id' | awk '{print $4}'}