"/sys/devices/platform/coretemp.0/hwmon/hwmon2/" shows 5 core temps despite being on a quad-core

I am doing some bash scripting for custom polybar temperature monitoring, however when I run ls /sys/devices/platform/coretemp.0/hwmon/hwmon2/, I get files for temp1 - temp5, even though I am using an Intel quad-core processor.

I am guessing one of them is an average of the other four, but I'm not sure if that's temp1 or temp5, or if there is something totally different going on.

Thank you,


Solution 1:

For each tempX, there is a tempX_label file which describes the temperature source.

From the linux kernel documentation (v5.14):

This driver can read both the per-core and per-package temperature using the appropriate sensors. ...

tempX_label: Contains string “Core X”, where X is processor number. For Package temp, this will be “Physical id Y”, where Y is the package number.

I noticed that tempX_label actually either contains Package id Y and not Phyisical id Y.

The CPU package is what one normally refers to as the processor.