Skip to content

feat: add powercap power draw - #609

Merged
corecoding merged 6 commits into
corecoding:developfrom
adil192:feat/powercap
Oct 17, 2026
Merged

corecoding merged 6 commits into
corecoding:developfrom
adil192:feat/powercap

Conversation

@adil192

@adil192 adil192 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

This builds on top of #601 to add power readings from powercap interfaces including intel-rapl.

Closes #602, closes #223

Caveats:

image

And it works when charging (when we can't use the battery discharge rate):

image

@adil192
adil192 marked this pull request as draft October 16, 2026 12:13
@adil192

adil192 commented Oct 16, 2026 •

Copy link
Copy Markdown
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-0

Update: 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
adil192 marked this pull request as ready for review October 16, 2026 12:34
@corecoding

Copy link
Copy Markdown
Owner

I am prepping the current development branch for release, this will be in the following release for sure! This is a great feature.

@corecoding
corecoding merged commit e4f41ce into corecoding:develop Oct 17, 2026
@adil192
adil192 deleted the feat/powercap branch October 17, 2026 19:01
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.

2 participants