Repository navigation
feat: add powercap power draw - #609
Merged
Merged
Conversation
adil192
marked this pull request as draft
October 16, 2026 12:13
Contributor
Author
|
They have human readable names, I'll add them: ❯ for f in /sys/class/powercap/*/name; do echo "$f: $(cat $f)"; done
/sys/class/powercap/intel-rapl:0:0/name: core
/sys/class/powercap/intel-rapl:0:1/name: uncore
/sys/class/powercap/intel-rapl:0:2/name: dram
/sys/class/powercap/intel-rapl:0/name: package-0
/sys/class/powercap/intel-rapl:1/name: psys
/sys/class/powercap/intel-rapl-mmio:0:0/name: dram
/sys/class/powercap/intel-rapl-mmio:0/name: package-0Update: Done and screenshot updated above. |
e.g. `intel-rapl-mmio:0` and `intel-rapl:0` both have name `package-0` and report the same energy_uj values. We must remove duplicates since we're measuring the rate of change. Duplicates make the rate of change zero.
adil192
marked this pull request as ready for review
October 16, 2026 12:34
Owner
|
I am prepping the current development branch for release, this will be in the following release for sure! This is a great feature. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds on top of #601 to add power readings from
powercapinterfaces includingintel-rapl.Closes #602, closes #223
Caveats:
power-groupvalue. The header says "No data" if hwmon doesn't expose power readings (like on my laptop).I've only tested on my Intel laptop. Not sure how/if this works with AMD.Update: Miraculously, intel-rapl works on AMD too!View the diff with https://github.com/corecoding/Vitals/pull/609/changes/b1caf2d40592515ad905fba628890888e01914c6..HEAD
And it works when charging (when we can't use the battery discharge rate):