Additional references for documentation
- /proc/stat explained
- Gathering CPU utilization from /proc/stat
- proc filesystem documentation
- CPU usage on Linux
- Using RAPL to read PP0 and DRAM energy on Haswell
- RAPL reference
- How to measure linux performance avoiding most typical mistakes: CPU
- How to calculate cpu utilization
Powercap/RAPL source code in the kernel
- arch/x86/events/intel/rapl.c
- drivers/powercap