Originally Posted by
pqwoerituytrueiwoq
So what exactly is this reading?
Code:
$ sensors amd_energy-*
amd_energy-isa-0000
Adapter: ISA adapter
Ecore000: 594.13 kJ
Ecore001: 594.10 kJ
Ecore002: 594.18 kJ
Ecore003: 594.24 kJ
Ecore004: 594.08 kJ
Ecore005: 594.05 kJ
Esocket0: 3.51 MJ
I think it may be total reading power consumed, but getting usable data out of that would require post processing across at least 2 snapshots
I am not familiar with AMD processors and their MSRs (Machine Specific Registers). But yes, I think you would have to take two samples and subtract. I assume your uptime is significant, otherwise that is a lot of energy.
Anyway, yes it looks like energy per core and total energy, likely since boot, or since the last wrap around. 3.51 Mega Joules. At a wild guess of 10 watts processor package power that's like an uptime of 98 hours or 98 hours since the last joule counter wrap around.
I know there has been work done on turbostat (an Intel tool, but in the kernel source tree) to support AMD processors. Try it, because if it knows about the AMD energy MSRs, it will do the math for you.
Here is my computer:
Code:
doug@s18:~$ sudo ~/turbostat --Summary --quiet --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 6
Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt
0.03 800 190 30 1.93 0.00
0.02 800 96 29 1.92 0.00
0.02 800 122 29 1.93 0.00
0.02 800 109 29 1.93 0.00
and using energy instead of power:
Code:
doug@s18:~$ sudo ~/turbostat --Summary --quiet --Joules --show Busy%,Bzy_MHz,PkgTmp,Pkg_J,GFXWatt,IRQ --interval 6
Busy% Bzy_MHz IRQ PkgTmp Pkg_J
0.04 800 240 30 11.47
0.03 800 133 30 11.49
0.03 800 151 29 11.50
0.02 800 98 29 11.63
0.02 800 105 29 11.58
and 11.50 / 6 = 1.917 watts. I often use joules as a way to get an extra digit, even though the counters aren't really that accurate at such low power.
And just for completeness, here is the same, but adding some load:
Code:
doug@s18:~$ sudo ~/turbostat --Summary --quiet --Joules --show Busy%,Bzy_MHz,PkgTmp,Pkg_J,GFXWatt,IRQ --interval 6
Busy% Bzy_MHz IRQ PkgTmp Pkg_J
0.03 1047 328 30 11.58
0.02 800 173 30 11.49
9.00 4580 5239 45 82.57
25.31 4600 15590 49 182.96
39.87 4600 24567 51 245.12
50.22 4600 29669 50 286.86
62.36 4600 35775 50 322.80
73.98 4600 41415 49 352.23
92.98 4600 48704 50 394.95
100.26 4600 51085 50 408.75
100.26 4600 51241 52 409.85
100.26 4600 51136 52 412.53
100.26 4600 51124 51 414.59
EDIT: Actually, I wonder if turbostat knows about your relatively new processor. Looking at its history in git shows the last AMD related edit as:
Code:
commit 3316f99a9f1b68c578c57e76792bd19da1c7d423
Author: Calvin Walton <calvin.walton@kepstin.ca>
Date: Fri Aug 17 12:34:42 2018 -0400
tools/power turbostat: Also read package power on AMD F17h (Zen)
The package power can also be read from an MSR...