View previous topic :: View next topic |
Author |
Message |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Sat Feb 01, 2025 1:07 pm Post subject: Where to find cpu per-core temperatures? |
|
|
Code: | ~ # uname -p
AMD Ryzen 9 5950X 16-Core Processor |
Looking at the btop display, I see that it shows a per core temperature for this cpu.
I think this means that it is reading the value from either /proc or /sys.
I would like to see the values, so I can play around with scripting stuff.
However, I have looked in vain for the entry that displays cpu core temperature. For example:
Code: | ~ # tree -f /sys/devices/virtual/thermal/cooling_device0 | grep -i temp
~ # tree -f /sys/devices/system/cpu/cpu0 | grep -i therm
~ # tree -f /sys/devices/system/cpu/cpu0 | grep -i temp |
Google searches suggest coretemp, but: Code: | ian2 ~ # modinfo coretemp
filename: /lib/modules/6.13.0-gentoo/kernel/drivers/hwmon/coretemp.ko
license: GPL
description: Intel Core temperature monitor
author: Rudolf Marek <r.marek@assembler.cz>
srcversion: 192255379DA165439094ED5
alias: cpu:type:x86,ven0000fam*mod*:feature:*01C0*
depends:
intree: Y
name: coretemp
retpoline: Y
vermagic: 6.13.0-gentoo SMP preempt mod_unload
sig_id: PKCS#7
signer:
sig_key:
sig_hashalgo: unknown
signature:
parm: tjmax:TjMax value in degrees Celsius (int)
ian2 ~ # modprobe coretemp
modprobe: ERROR: could not insert 'coretemp': No such device
|
..so, Intel only, and btop is seeing the core temperatures without it.
My Google skills (if any) have now hit their limit - does anyone know what path btop is reading to get the core temps?
Thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54856 Location: 56N 3W
|
Posted: Sat Feb 01, 2025 1:50 pm Post subject: |
|
|
ipic,
You need
That depends on the kernel module ryzen_smu which is provided by app-admin/ryzen_smu.
I have the same CPU. It shows
Code: | ╭─────────┬────────────┬──────────┬─────────┬──────────┬─────────────┬─────────────┬─────────────╮
│ Core 0 │ Sleeping | 0.051 W | 0.217 V | 29.68 C | C0: 0.1 % | C1: 2.3 % | C6: 97.7 % │
│ Core 1 │ Sleeping | 0.012 W | 0.200 V | 29.83 C | C0: 0.0 % | C1: 0.0 % | C6: 99.9 % │
│ Core 2 │ Sleeping | 0.012 W | 0.200 V | 29.63 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
│ Core 3 │ Sleeping | 0.012 W | 0.200 V | 29.82 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
│ Core 4 │ Sleeping | 0.012 W | 0.200 V | 29.60 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
│ Core 5 │ Sleeping | 0.012 W | 0.200 V | 29.69 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
│ Core 6 │ Sleeping | 0.012 W | 0.200 V | 29.56 C | C0: 0.0 % | C1: 0.1 % | C6: 100.0 % │
│ Core 7 │ Sleeping | 0.012 W | 0.200 V | 29.73 C | C0: 0.0 % | C1: 0.1 % | C6: 100.0 % │
│ Core 8 │ Sleeping | 0.353 W | 0.258 V | 27.24 C | C0: 2.3 % | C1: 5.9 % | C6: 92.2 % │
│ Core 9 │ Sleeping | 0.117 W | 0.205 V | 26.45 C | C0: 0.4 % | C1: 0.8 % | C6: 99.3 % │
│ Core 10 │ Sleeping | 0.117 W | 0.216 V | 26.61 C | C0: 1.9 % | C1: 0.3 % | C6: 97.9 % │
│ Core 11 │ Sleeping | 0.022 W | 0.201 V | 26.35 C | C0: 0.0 % | C1: 0.2 % | C6: 99.9 % │
│ Core 12 │ Sleeping | 0.006 W | 0.200 V | 26.41 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
│ Core 13 │ Sleeping | 0.155 W | 0.209 V | 26.33 C | C0: 0.3 % | C1: 1.0 % | C6: 98.8 % │
│ Core 14 │ Sleeping | 0.012 W | 0.201 V | 26.37 C | C0: 0.0 % | C1: 0.2 % | C6: 99.8 % │
│ Core 15 │ Sleeping | 0.006 W | 0.200 V | 26.34 C | C0: 0.0 % | C1: 0.0 % | C6: 100.0 % │
╰─────────┴────────────┴──────────┴─────────┴──────────┴─────────────┴─────────────┴─────────────╯ |
and lots of other stuff too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Sat Feb 01, 2025 4:20 pm Post subject: |
|
|
Many thanks Neddy.
I now have sensory overload
I'm still wondering where btop got its core temp data from though. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Banana Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
![](images/avatars/5204386264b863c6da7ffb.jpg)
Joined: 21 May 2004 Posts: 1893 Location: Germany
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Thu Feb 13, 2025 9:24 pm Post subject: |
|
|
Just looking at the output from ryzen_monitor, and I see that all 16 cores of my 5950X are 'Sleeping'
Odd - given that ryzen_monitor must have been running on at least one of them to produce the output ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CooSee Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/116667693650fadeb419aaa.jpg)
Joined: 20 Nov 2004 Posts: 1514 Location: Earth
|
Posted: Thu Feb 13, 2025 11:55 pm Post subject: |
|
|
i assume btop getting it via sensors
Code: | coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +33.0°C (high = +80.0°C, crit = +100.0°C)
Core 0: +32.0°C (high = +80.0°C, crit = +100.0°C)
Core 1: +30.0°C (high = +80.0°C, crit = +100.0°C)
Core 2: +26.0°C (high = +80.0°C, crit = +100.0°C)
Core 3: +28.0°C (high = +80.0°C, crit = +100.0°C) |
![Cool 8)](images/smiles/icon_cool.gif) _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 8:17 am Post subject: |
|
|
That sensors output is not present on my motherboard:
Code: |
~ # sensors
nct6798-isa-0290
Adapter: ISA adapter
in0: 248.00 mV (min = +0.00 V, max = +1.74 V)
in1: 992.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in2: 3.39 V (min = +0.00 V, max = +0.00 V) ALARM
in3: 3.33 V (min = +0.00 V, max = +0.00 V) ALARM
in4: 1.01 V (min = +0.00 V, max = +0.00 V) ALARM
in5: 1.05 V (min = +0.00 V, max = +0.00 V)
in6: 208.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in7: 3.39 V (min = +0.00 V, max = +0.00 V) ALARM
in8: 3.26 V (min = +0.00 V, max = +0.00 V) ALARM
in9: 1.81 V (min = +0.00 V, max = +0.00 V) ALARM
in10: 816.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in11: 2.05 V (min = +0.00 V, max = +0.00 V) ALARM
in12: 1.03 V (min = +0.00 V, max = +0.00 V) ALARM
in13: 264.00 mV (min = +0.00 V, max = +0.00 V) ALARM
in14: 200.00 mV (min = +0.00 V, max = +0.00 V) ALARM
fan1: 600 RPM (min = 0 RPM)
fan2: 496 RPM (min = 0 RPM)
fan3: 799 RPM (min = 0 RPM)
fan4: 527 RPM (min = 0 RPM)
fan5: 0 RPM (min = 0 RPM)
fan6: 4205 RPM (min = 0 RPM)
fan7: 793 RPM (min = 0 RPM)
SYSTIN: +23.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +125.0°C) sensor = thermistor
CPUTIN: +24.5°C (high = +80.0°C, hyst = +75.0°C)
(crit = +125.0°C) sensor = thermistor
AUXTIN0: +95.0°C (high = +80.0°C, hyst = +75.0°C) ALARM
(crit = +125.0°C) sensor = thermistor
AUXTIN1: +36.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +125.0°C) sensor = thermistor
AUXTIN2: -62.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +100.0°C) sensor = thermistor
AUXTIN3: +84.0°C (high = +80.0°C, hyst = +75.0°C) ALARM
(crit = +100.0°C) sensor = thermistor
AUXTIN4: +23.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +100.0°C)
PECI Agent 0 Calibration: +24.0°C (high = +80.0°C, hyst = +75.0°C)
PCH_CHIP_CPU_MAX_TEMP: +0.0°C
PCH_CHIP_TEMP: +0.0°C
PCH_CPU_TEMP: +0.0°C
PCH_MCH_TEMP: +0.0°C
TSI0_TEMP: +31.5°C
pwm1: 22% (mode = pwm)
pwm2: 26% (mode = pwm)
pwm3: 36% (mode = pwm)
pwm4: 44% (mode = pwm)
pwm5: 76% (mode = pwm) MANUAL CONTROL
pwm6: 128% (mode = pwm)
intrusion0: ALARM
intrusion1: ALARM
beep_enable: disabled
drivetemp-scsi-4-0
Adapter: SCSI adapter
temp1: +20.0°C (low = +0.0°C, high = +100.0°C)
(crit low = +0.0°C, crit = +100.0°C)
(lowest = +19.0°C, highest = +27.0°C)
drivetemp-scsi-2-0
Adapter: SCSI adapter
temp1: +22.0°C (low = +0.0°C, high = +100.0°C)
(crit low = +0.0°C, crit = +100.0°C)
(lowest = +19.0°C, highest = +27.0°C)
amdgpu-pci-0800
Adapter: PCI adapter
vddgfx: 1.04 V
fan1: 945 RPM (min = 0 RPM, max = 3200 RPM)
edge: +21.0°C (crit = +94.0°C, hyst = -273.1°C)
PPT: 42.01 W (cap = 175.00 W)
pwm1: 26% MANUAL CONTROL
sclk: 779 MHz
mclk: 300 MHz
drivetemp-scsi-5-0
Adapter: SCSI adapter
temp1: +19.0°C (low = +0.0°C, high = +100.0°C)
(crit low = +0.0°C, crit = +100.0°C)
(lowest = +18.0°C, highest = +28.0°C)
drivetemp-scsi-3-0
Adapter: SCSI adapter
temp1: +36.0°C
k10temp-pci-00c3
Adapter: PCI adapter
Tctl: +31.8°C
Tccd1: +30.0°C
Tccd2: +26.5°C
~ #
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
user Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 08 Feb 2004 Posts: 220
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 2:44 pm Post subject: |
|
|
Yeah. I got that. At the start of the thread.
However, btop displays per core temperatures on my platform.
The thread is about where these values come from. I'm looking at the source code but it's slow going. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
CooSee Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/116667693650fadeb419aaa.jpg)
Joined: 20 Nov 2004 Posts: 1514 Location: Earth
|
Posted: Fri Feb 14, 2025 4:19 pm Post subject: |
|
|
start btop >> press M for Menu >> then Options >> Nr. 2 for CPU >> Cpu Sensor << defaults to Auto
via arrow keys you'll see which Sensor Modules are available on your System << choose to try out which is showing the Temps.
![Cool 8)](images/smiles/icon_cool.gif) _________________ " Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier " |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 5:02 pm Post subject: |
|
|
CooSee wrote: | start btop >> press M for Menu >> then Options >> Nr. 2 for CPU >> Cpu Sensor << defaults to Auto
via arrow keys you'll see which Sensor Modules are available on your System << choose to try out which is showing the Temps.
![Cool 8)](images/smiles/icon_cool.gif) |
Thanks for the tips.
Scrolling through the available sensors shows me the same as what sensors shows me.
Interestingly, if I change the sensor to something stupid (like an unconnected value), the core displays keep showing the core cpu temps (not the stupid value)
I think I have almost reached the point where I can say that btop is faking the core temps - as in using a K10 value and just repeating it.
My hypothesis is that it 'looks' like its reporting core temps because the value changes as its samples for each of the 32 threads.
Still hunting through the btop code to confirm this. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2722
|
Posted: Fri Feb 14, 2025 7:21 pm Post subject: |
|
|
Do you happen to have zenpower3 built?
I used to use it but once I forgot to emerge it for the new kernel and Freon, a Gnome extension was able to still show tdie and tctl.
But it was capable of displaying everything per core. There was a small program - zenmonitor3 which read it all and displayed it.
Unfortunately it doesn't produce a module fo kernels >6.1. Only some zenstats.ko which I don't know what's good for.
p.s. I now use k10temp but btop doesn't show per core temperature. Only load. My CPU is R7 5800H.
Best Regards,
Georgi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 7:35 pm Post subject: |
|
|
These are the only references to zenpower or zenmonitor that I can find on the system:
Code: |
~ # ls /var/cache/edb/dep/var/db/repos/guru/sys-kernel/zenpower3-0.2.0
/var/cache/edb/dep/var/db/repos/guru/sys-kernel/zenpower3-0.2.0
~ # ls /var/cache/edb/dep/var/db/repos/guru/app-admin/zenmonitor3-2.0.0
/var/cache/edb/dep/var/db/repos/guru/app-admin/zenmonitor3-2.0.0
~ #
|
Once apon a time I used the guru overlay to pull a ebuild in, but it is not currently active.
I think the above is a result of running `eselect repository list` at some point. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2722
|
Posted: Fri Feb 14, 2025 7:44 pm Post subject: |
|
|
I went and dug old sources of zenmonitor. It didn't show per core temperatures. I don't think Ryzen's have separate sensors at all. Or if they have them, if they are individually accessible. I think the sensor is composite.
I also remember when they were developing zenpower3, the goal was to have tdie and tctl, not per CPU temperatures. It only shows per CPU frequencies and power consumption.
Could you tell me how you make btop to show you the temperatures?
Best Regards,
Georgi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2722
|
Posted: Fri Feb 14, 2025 7:55 pm Post subject: |
|
|
OK, ryzen_monitor shows Core Statistics (Calculated) where it shows temperatures for every core. However pay attention to the red text.
Best Regards,
Georgi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 8:03 pm Post subject: |
|
|
logrusx wrote: | I went and dug old sources of zenmonitor. It didn't show per core temperatures. I don't think Ryzen's have separate sensors at all. Or if they have them, if they are individually accessible. I think the sensor is composite.
I also remember when they were developing zenpower3, the goal was to have tdie and tctl, not per CPU temperatures. It only shows per CPU frequencies and power consumption.
Could you tell me how you make btop to show you the temperatures?
Best Regards,
Georgi |
I just type and it shows per core temperatures. I made no changes since emerging it, and it's ebuild has no use flags. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2722
|
Posted: Fri Feb 14, 2025 8:05 pm Post subject: |
|
|
ipic wrote: |
I just type and it shows per core temperatures. I made no changes since emerging it, and it's ebuild has no use flags. |
Maybe our CPU's are not that similar as I think.
p.s. I recalled something: https://forums.gentoo.org/viewtopic-p-8834990.html#8834990
Best Regards,
Georgi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54856 Location: 56N 3W
|
Posted: Fri Feb 14, 2025 8:49 pm Post subject: |
|
|
ipic,
I've just tried btop on my 5950X. Its 16 cores with 2 threads/core
btop shows me temperatures for 32 cores. I don't believe it.
How can it tell which thread is which for temperature sensing?
There are certainly no sensors like that. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ipic Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/TV Stars/tealc1.jpg)
Joined: 29 Dec 2003 Posts: 441 Location: UK
|
Posted: Fri Feb 14, 2025 10:00 pm Post subject: |
|
|
NeddySeagoon wrote: | ipic,
I've just tried btop on my 5950X. Its 16 cores with 2 threads/core
btop shows me temperatures for 32 cores. I don't believe it.
How can it tell which thread is which for temperature sensing?
There are certainly no sensors like that. |
I agree. I think it is just taking whatever it has decided is the CPU temperature, and reading that for each "core" (actually thread - as you point out).
ryzen_monitor on the other hand gives load of useful info, like the power per core and total power output, etc
I'm writing myself a program that will present that in a few different ways - just for my enjoyment ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|