Closed schaerfo closed 4 years ago
Thanks a lot for this PR. This is much needed functionality. I'll do my best to review it shortly. What are the implications of using Python 3.6 here? Will it be required for all future versions, or only if AMD power read is supported?
Older Python versions throw a syntax error, therefore I replaced it with traditional % string formatting. This works even with Python 2.7
Thanks. Could you please link a screenshot of what this looks like on your system?
Sure, the power reading from the entire socket dwarfs the ones from the cores but fortunately it can be hidden
Great! Thanks for the changes Merging :)
I have tested this on my Ryzen 7 4800HS and Ryzen 9 3950X CPUs on kernel 5.8.0-rc5. The reported numbers are reasonable. Notice that I have used string interpolation which was introduced in Python 3.6.
Implements #32.
Edit: Previously it was stated that the energy reading works with kernel 5.8.0-rc6. This is not true since the driver now performs more restrictive checks for CPU support (see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f28e360f29031fdef8df3a1bcad666243bd6872d)