chore: how to check cpu frequency on linux

This commit is contained in:
Michele Cereda
2024-01-04 23:35:07 +01:00
parent 1540711552
commit 18a24c39aa

View File

@@ -0,0 +1,17 @@
# Check or set the CPU frequency or governor
```sh
cat '/sys/devices/system/cpu/cpufreq/'*'/affected_cpus'
cat '/sys/devices/system/cpu/cpufreq/'*'/scaling_available_governors'
# Get the current active governor.
cat '/sys/devices/system/cpu/cpufreq/policy0/scaling_governor'
cat '/sys/devices/system/cpu/cpufreq/'*'/scaling_governor'
# Enable a new governor.
echo 'schedutil' | sudo tee '/sys/devices/system/cpu/cpufreq/policy0/scaling_governor'
echo 'powersave' | sudo tee '/sys/devices/system/cpu/cpufreq/policy1/scaling_governor'
# Do not boost the CPU frequency for nice loads.
echo 1 | sudo tee '/sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load'
```