diff options
Diffstat (limited to 'src/linux/cpufreq.md')
-rw-r--r-- | src/linux/cpufreq.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/linux/cpufreq.md b/src/linux/cpufreq.md new file mode 100644 index 0000000..7e455e2 --- /dev/null +++ b/src/linux/cpufreq.md @@ -0,0 +1,31 @@ +# cpufreq + +The `sysfs` interface to cpu frequency settings and current state. +``` +/sys/devices/system/cpu/cpu*/cpufreq/ +``` + +## cpupower(1) + +A CLI interface to peek and poke the cpu frequency settings. + +``` +# Show current frequency of all cores. +cpupower -c all frequency-info -f -m + +# Show currently set frequency governor. +cpupower -c all frequency-info -p + +# List available frequency governors. +cpupower -c all frequency-info -g + +# Change frequency governor to POWERSAVE (eg). +cpupower -c all frequency-set -g powersave +``` + +## Example + +Watch cpu frequency. +```sh +watch -n1 "cpupower -c all frequency-info -f -m | xargs -n2 -d'\n'" +``` |