htop
htop copied to clipboard
Missing temperature for some threads
I'm using self compiled 3.1.1 release.
On one computer I missing temperature for threads 5-8

In btop++ I see temperature for all cores

For the same CPU on other computer it's all fine

Related to https://github.com/htop-dev/htop/issues/806
@somera: Can you please provide the sensors -u output?
not working computer:
$ sudo sensors -u
pch_cannonlake-virtual-0
Adapter: Virtual device
temp1:
temp1_input: 30.000
acpitz-acpi-0
Adapter: ACPI interface
temp1:
temp1_input: -263.200
temp2:
temp2_input: 27.800
temp2_crit: 119.000
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:
ERROR: Can't get value of subfeature temp1_input: Can't read
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:
temp1_input: 32.000
temp1_max: 100.000
temp1_crit: 100.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 29.000
temp2_max: 100.000
temp2_crit: 100.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 31.000
temp3_max: 100.000
temp3_crit: 100.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 31.000
temp4_max: 100.000
temp4_crit: 100.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 30.000
temp5_max: 100.000
temp5_crit: 100.000
temp5_crit_alarm: 0.000
working computer:
$ sudo sensors -u
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:
temp1_input: 45.000
temp1_max: 100.000
temp1_crit: 100.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 43.000
temp2_max: 100.000
temp2_crit: 100.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 43.000
temp3_max: 100.000
temp3_crit: 100.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 44.000
temp4_max: 100.000
temp4_crit: 100.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 43.000
temp5_max: 100.000
temp5_crit: 100.000
temp5_crit_alarm: 0.000
acpitz-acpi-0
Adapter: ACPI interface
temp1:
temp1_input: -263.200
temp2:
temp2_input: 27.800
temp2_crit: 119.000
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:
ERROR: Can't get value of subfeature temp1_input: Can't read
pch_cannonlake-virtual-0
Adapter: Virtual device
temp1:
temp1_input: 43.000
I have two same NUCs. ;) On the one it's working. On the other not,
$ lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Socket(s): 1
NUMA node(s): 1
Model name: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
NUMA node0 CPU(s): 0-7
The important line in this:
Thread(s) per core: 2
4 physical processors - four temperature sensors. My chip (Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz) has 5 sensors. One per CPU and one GPU. The built-in GPU is disabled and the temperature sensor is not visible for it. The plasmoid on the desktop shows this picture:

Most likely, we need to correctly display the readings of real physical sensors in a separate line, and not mix everything. I.e., for each individual CPU (real \virtual), show the loading slider and frequency, and put the temperature sensors in a separate group.
And now the same issue with the NUC where is works for threads 5-8 ;)

@somera: This seems to be depending on the sequence of sensors as detected by libsensors.
Can you confirm the sensors -u on that computer is different from the one you pasted in the https://github.com/htop-dev/htop/issues/856#issuecomment-950190585 ?
1st NUC:
$ sensors -u
pch_cannonlake-virtual-0
Adapter: Virtual device
temp1:
temp1_input: 39.000
acpitz-acpi-0
Adapter: ACPI interface
temp1:
temp1_input: -263.200
temp2:
temp2_input: 27.800
temp2_crit: 119.000
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:
ERROR: Can't get value of subfeature temp1_input: Can't read
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:
temp1_input: 39.000
temp1_max: 100.000
temp1_crit: 100.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 38.000
temp2_max: 100.000
temp2_crit: 100.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 39.000
temp3_max: 100.000
temp3_crit: 100.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 39.000
temp4_max: 100.000
temp4_crit: 100.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 38.000
temp5_max: 100.000
temp5_crit: 100.000
temp5_crit_alarm: 0.000
2nd NUC:
$ sensors -u
pch_cannonlake-virtual-0
Adapter: Virtual device
temp1:
temp1_input: 29.000
acpitz-acpi-0
Adapter: ACPI interface
temp1:
temp1_input: -263.200
temp2:
temp2_input: 27.800
temp2_crit: 119.000
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:
ERROR: Can't get value of subfeature temp1_input: Can't read
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:
temp1_input: 31.000
temp1_max: 100.000
temp1_crit: 100.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 28.000
temp2_max: 100.000
temp2_crit: 100.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 29.000
temp3_max: 100.000
temp3_crit: 100.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 28.000
temp4_max: 100.000
temp4_crit: 100.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 28.000
temp5_max: 100.000
temp5_crit: 100.000
temp5_crit_alarm: 0.000
At this very moment in time.
htop> ./htop --version
htop 3.2.0-dev
htop> sensors --version
sensors version 3.5.0 with libsensors version 3.5.0
htop> sensors -u
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:
temp1_input: 48.000
temp1_max: 80.000
temp1_crit: 98.000
temp1_crit_alarm: 0.000
Core 0:
temp2_input: 25.000
temp2_max: 80.000
temp2_crit: 98.000
temp2_crit_alarm: 0.000
Core 1:
temp3_input: 36.000
temp3_max: 80.000
temp3_crit: 98.000
temp3_crit_alarm: 0.000
Core 2:
temp4_input: 48.000
temp4_max: 80.000
temp4_crit: 98.000
temp4_crit_alarm: 0.000
Core 3:
temp5_input: 37.000
temp5_max: 80.000
temp5_crit: 98.000
temp5_crit_alarm: 0.000
./htop

At this very moment in time.
Not for me ...
$ sensors --version
sensors version 3.6.0 with libsensors version 3.6.0
$ ./htop --version
htop 3.2.0-dev
$ git log -1 --format="%H"
63fafb4844dd619793ba1d318e2b06518666dd37

sensors --version sensors version 3.6.0 with libsensors version 3.6.0
Thanks for the information. Your picture shows the truth. I should change 'sensors` to a more up-to-date version.
sensors version 3.5.0 with libsensors version 3.5.0
That means, that with
sensors version 3.5.0 with libsensors version 3.5.0
and with
sensors version 3.6.0 with libsensors version 3.6.0
not?
I didn't check this with 3.5.0.
There are 4 physical cores in this processor. There is a temperature sensor on each physical core. Another sensor shows the temperature of the GPU. There are 5 of them in total. In your picture, numbers 5, 6, 7, 8 are virtual cores. They don't have sensors. Your picture shows the truth, and my green one is a lie.
Here with a Ryzen 5 3600 I have temperature missing in htop on all but one core.
sensors -u
k10temp-pci-00c3
Adapter: PCI adapter
Tctl:
temp1_input: 65.750
Tccd1:
temp3_input: 65.000
acpitz-acpi-0
Adapter: ACPI interface
temp1:
temp1_input: 16.800
temp1_crit: 20.800
temp2:
temp2_input: 16.800
temp2_crit: 20.800
nvme-pci-0100
Adapter: PCI adapter
Composite:
temp1_input: 46.850
temp1_max: 86.850
temp1_min: -0.150
temp1_crit: 89.850
temp1_alarm: 0.000
Sensor 1:
temp2_input: 46.850
temp2_max: 65261.850
temp2_min: -273.150
https://i.imgur.com/ZNFWApZ.jpg