perf rapl/powercap : powercap has more lenient permissions
From: Vince Weaver
Date: Wed Feb 24 2016 - 11:42:22 EST
Hello
so perf_event requires paranoid value of 0 to read the RAPL counters
perf stat -a -e power/energy-cores/ /bin/ls
Error:
You may not have permission to collect system-wide stats.
But I can use the new powercap driver to read the same values no problem:
cat /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/intel-rapl:0:0/energy_uj
121384969344
Is this expected? Should the powercap permissions be locked down more?
Just hitting this, as PAPI has at least 4 different interfaces to read the
RAPL power values (perf_event, /dev/msr, libmsr, powercap). Five if you
count that AMD exports their equivelent info via the hwmon interface.
Vince