Closed artiomn closed 3 months ago
It is possible to get some PCM metrics as non-root user (pcm uses standard Linux APIs then). But not all metrics are exposed by Linux APIs.. Please check out this: https://github.com/intel/pcm/?tab=readme-ov-file#executing-pcm-tools-under-non-root-user-on-linux
Is it possible to get power not under the root
not aware of such method. Even the Linux sysfs API for that (/sys/class/powercap/*/energy_uj) is only for root ("-r--------")
Is it possible to get power per CPU core?
Client (Desktop/Laptop) CPUs have MSRs for PKG (package power), PP0 (all cores), PP1 (uncore). But there is no per-core power MSR on client and server processors.
Ok, I understood. Thank you. Maybe a daemon will solve this problem (but it's not very suitable for my project right now).
I need to get CPU power and using PCM for this task in a similar way:
All is ok (under Linux, at least), but there is two problems:
root
(pcminstance->program(), probably can't get access to the MSR).Is it possible to get power not under the root and get power per CPU core?