cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain
authorThomas Renninger <trenn@suse.de>
Wed, 23 Nov 2022 11:18:10 +0000 (12:18 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 30 Nov 2022 23:48:34 +0000 (16:48 -0700)
commit8c37df3d635eac64a8fbb4b26672fb881e0cb673
tree84b1ea0ddeb191fd5d4942d1884a7ee675ae78dd
parentc2294c1496b7169d5b14c2fa27526ba35da9f5ac
cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain

This CPU power monitor shows the power consumption
as exposed by the powercap subsystem, cmp with:
Documentation/power/powercap/powercap.rst

cpupower monitor -m RAPL
    | RAPL
 CPU| pack | core | unco
   0|6853926|967832|442381
   8|6853926|967832|442381
   1|6853926|967832|442381
   9|6853926|967832|442381

Unfortunately RAPL domains cannot be directly mapped to the corresponding
CPU socket/package, core it belongs to.
Not sure this is possible at all with the current data exposed from the
kernel.

Still it can be worthful information for developers trying to optimize
power consumption of workloads or their system in general.

Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: Zhang Rui <rui.zhang@intel.com>
CC: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/Makefile
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
tools/power/cpupower/utils/idle_monitor/idle_monitors.def
tools/power/cpupower/utils/idle_monitor/rapl_monitor.c [new file with mode: 0644]