Verify governor in /sys/devices/system/cpu
In the previous step, we used cpufreq-info
to see the CPU governor. Linux also exposes system information through the /sys
filesystem. This filesystem provides a view into the kernel's data structures.
We can find information about the CPU governor in the /sys/devices/system/cpu
directory. This directory contains subdirectories for each CPU core (e.g., cpu0
, cpu1
, etc.).
Let's navigate to the directory for the first CPU core, cpu0
. We'll use the cd
command to change directories.
Type the following command and press Enter:
cd /sys/devices/system/cpu/cpu0/cpufreq
Now that we are in the /sys/devices/system/cpu/cpu0/cpufreq
directory, we can list the files to see what information is available. Use the ls
command:
ls
You will see a list of files, including scaling_governor
. This file contains the name of the currently active CPU governor for this core.
To view the content of the scaling_governor
file, we'll use the cat
command.
Type the following command and press Enter:
cat scaling_governor
The output will be the name of the current governor, for example:
powersave
This confirms the governor setting directly from the system's perspective.
You can explore other files in this directory to find more information about the CPU frequency settings, such as scaling_available_governors
to see all available governors for this core.
Remember to use cd
to change back to your home directory or ~/project
when you are done exploring /sys
.
cd ~/project
Click Continue to move on.