Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPU power (watts) monitoring on linux (only Intel CPUs) #595

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YuriiShkrobut
Copy link

@YuriiShkrobut YuriiShkrobut commented Aug 9, 2023

Added power consumption monitoring support on linux
Root permissions are required.

image

@YuriiShkrobut YuriiShkrobut changed the title Add power CPU consumption monitoring on windows Add power CPU consumption monitoring on linux Aug 9, 2023
@YuriiShkrobut YuriiShkrobut force-pushed the linux_power_consumption_support branch from e65b0a3 to dcd3642 Compare August 9, 2023 13:04
@YuriiShkrobut YuriiShkrobut changed the title Add power CPU consumption monitoring on linux Add power CPU consumption monitoring on linux (only Intel CPUs) Aug 9, 2023
@YuriiShkrobut YuriiShkrobut changed the title Add power CPU consumption monitoring on linux (only Intel CPUs) Add CPU power (watts) usage monitoring on linux (only Intel CPUs) Aug 9, 2023
@YuriiShkrobut YuriiShkrobut changed the title Add CPU power (watts) usage monitoring on linux (only Intel CPUs) Add CPU power (watts) monitoring on linux (only Intel CPUs) Aug 9, 2023
@voidpointertonull
Copy link

The Intel RAPL kernel module supports AMD CPUs too:
torvalds/linux@43756a2

@yurii-shkrobut
Copy link

The Intel RAPL kernel module supports AMD CPUs too: torvalds/linux@43756a2

Great, but I have no AMD cpu to test, need to rebase this PR to check if it still works

@robke96
Copy link

robke96 commented Jan 23, 2025

Seems to work, tried with 2 systems:

  • AMD Ryzen 7 1700 | Fedora 41
  • AMD Ryzen 5 4600G | Fedora 41 Live ISO

For some reason, I had to run it as sudo, on main R7 1700 system, without sudo I get error:

ERROR: Exception in runner thread -> Cpu:: -> key not found

On an R5 4600G system, btop launches without sudo but doesn't display power usage; with sudo, it does.

Ryzen7_1700
Ryzen5_4600G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants