From 18a24c39aa7748552f17186401e1d8c99d2390cd Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 4 Jan 2024 23:35:07 +0100 Subject: [PATCH] chore: how to check cpu frequency on linux --- ...et the cpu frequency or governor.placeholder | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 knowledge base/check or set the cpu frequency or governor.placeholder diff --git a/knowledge base/check or set the cpu frequency or governor.placeholder b/knowledge base/check or set the cpu frequency or governor.placeholder new file mode 100644 index 0000000..c657f66 --- /dev/null +++ b/knowledge base/check or set the cpu frequency or governor.placeholder @@ -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' +```