zen-rapl/README.md
2024-09-26 21:19:46 -07:00

59 lines
1.6 KiB
Markdown

# zen-rapl
Advanced monitoring of core power and frequencies on AMD Zen processors using MSR.
This uses model-specific registers (MSRs) to read the running average power levels (RAPL) the processor. It is designed to compliment the [Zenpower3 driver](https://github.com/koweda/zenpower3).
The output has been formatted to resemble those from the `sensors` utility so scripts that use the output from that command can parse it the same.
## Example output
```
zen3-rapl
Package: 109.59 W
Core_0: 4.50 W
Core_1: 5.02 W
Core_2: 4.38 W
Core_3: 4.71 W
Core_4: 3.60 W
Core_5: 3.91 W
Core_6: 3.42 W
Core_7: 4.00 W
Core_8: 1.20 W
Core_9: 2.46 W
Core_10: 2.26 W
Core_11: 2.44 W
Core_12: 0.97 W
Core_13: 1.62 W
Core_14: 0.08 W
Core_15: 1.52 W
Core_0_eff: 4.600 GHz
Core_1_eff: 3.680 GHz
Core_2_eff: 3.680 GHz
Core_3_eff: 3.680 GHz
Core_4_eff: 3.680 GHz
Core_5_eff: 3.680 GHz
Core_6_eff: 3.680 GHz
Core_7_eff: 3.680 GHz
Core_8_eff: 3.680 GHz
Core_9_eff: 4.600 GHz
Core_10_eff: 3.680 GHz
Core_11_eff: 3.680 GHz
Core_12_eff: 3.680 GHz
Core_13_eff: 3.680 GHz
Core_14_eff: 3.680 GHz
Core_15_eff: 3.680 GHz
```
## Requirements
* AMD family 17h or 19h processor (Zen, Zen2, Zen3)
* MSR kernel module (`modprobe msr`)
* Access to the MSR device files at `/dev/cpu/*/msr` (usually requires root)
## Building
1. `make`
2. `sudo ./zen-rapl`
## Acknowlegements
Based upon some code from [Zenmonitor 3](https://github.com/jpr999/zenmonitor3)