Skip to content

Add AMD CPU power monitoring via hwmon - #114

Merged
Nortank12 merged 1 commit into
Nortank12:mainfrom
divanikus:main
Aug 25, 2026
Merged

Nortank12 merged 1 commit into
Nortank12:mainfrom
divanikus:main

Conversation

@divanikus

Copy link
Copy Markdown
Contributor

Adds CPU power monitoring support for AMD processors while preserving the existing Intel RAPL implementation.

AMD energy counters are exposed through the hwmon interface by the zenergy or amd_energy driver. The program now finds the package-level Esocket channel and calculates CPU power from its cumulative microjoule counter.

Changes

  • Keep using Intel RAPL when available.
  • Detect zenergy and amd_energy hwmon devices.
  • Select the package-level Esocket energy counter instead of per-core counters.
  • Handle AMD counter resets without reporting an invalid power spike.

Detect package energy from zenergy and amd_energy hwmon devices while preserving Intel RAPL support.
@Nortank12

Copy link
Copy Markdown
Owner

I have reviewed and tested your changes with intel_rapl and zenergy. Thank you for the great work!

Your code will be included in the next release.

@Nortank12
Nortank12 merged commit 812c306 into Nortank12:main Aug 25, 2026
@Nortank12 Nortank12 added the enhancement New feature or request label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants