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.
linuxpower-management
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.
Best Answer
The current governor can be obtained as follows:
Note that cpu* will give you the scaling governor of all your cores and not just e.g. cpu0.
This solution might be system dependent, though. I'm not 100% sure this is portable.