diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-27 19:50:56 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-08-27 19:50:56 +0200 |
commit | 72bb8889d2c28f4c3c0198c77bb9fb89e0dfc0df (patch) | |
tree | 8cd71a424ca761b9722a8e8fe6b55e4e8e72c6a1 /src | |
parent | b5a7c219f06b296c0e6c392bf6691495dbfa6425 (diff) | |
download | notes-72bb8889d2c28f4c3c0198c77bb9fb89e0dfc0df.tar.gz notes-72bb8889d2c28f4c3c0198c77bb9fb89e0dfc0df.zip |
cpufreq: add initial notes + cpupower
Diffstat (limited to 'src')
-rw-r--r-- | src/SUMMARY.md | 1 | ||||
-rw-r--r-- | src/linux/README.md | 1 | ||||
-rw-r--r-- | src/linux/cpufreq.md | 31 |
3 files changed, 33 insertions, 0 deletions
diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 4d94d26..b224944 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -77,6 +77,7 @@ - [input](./linux/input.md) - [acl](./linux/acl.md) - [zfs](./linux/zfs.md) + - [cpufreq](./linux/cpufreq.md) - [Network](./network/README.md) - [ss](./network/ss.md) diff --git a/src/linux/README.md b/src/linux/README.md index 4edddde..196ae68 100644 --- a/src/linux/README.md +++ b/src/linux/README.md @@ -8,3 +8,4 @@ - [input](./input.md) - [acl](./acl.md) - [zfs](./zfs.md) +- [cpufreq](./cpufreq.md) 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'" +``` |