I want to get the current CPUPower governor.
When I type
cpupower frequency-info I get a lot of information. I just want to get the governor, just like "ondemand" with no more information, to use its value in a program.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
In the latest Fedora release (26 alpha) on my Ryzen 7 system, I did this:
Fedora 26 alpha didn't have cpupower installed - so get it:
dnf install kernel-tools
/etc/sysconfig/cpupower which should set performance level by default (edit the first line if you want a different level):
CPUPOWER_START_OPTS="frequency-set -g performance" CPUPOWER_STOP_OPTS="frequency-set -g ondemand"
Now the critical bit - enable and start the cpupower service
systemctl enable --now cpupower
Confirm that performance level is set:
Reboot and repeat that
cat command to confirm still performance