How to get current CPUPower governor
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.
linux power-management
add a comment |
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.
linux power-management
add a comment |
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.
linux power-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.
linux power-management
linux power-management
edited Feb 20 '18 at 3:48
Jeff Schaller
43.4k1160140
43.4k1160140
asked Feb 3 '15 at 16:35
user3379482user3379482
2551211
2551211
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The current governor can be obtained as follows:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
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.
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
add a comment |
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
This installs /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:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Reboot and repeat that cat
command to confirm still performance
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182696%2fhow-to-get-current-cpupower-governor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The current governor can be obtained as follows:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
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.
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
add a comment |
The current governor can be obtained as follows:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
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.
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
add a comment |
The current governor can be obtained as follows:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
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.
The current governor can be obtained as follows:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
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.
edited Feb 22 at 22:07
Community♦
1
1
answered Feb 3 '15 at 16:44
MarcoMarco
25.4k783120
25.4k783120
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
add a comment |
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
1
1
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
Working in Fedora 23! With cpupower frequency-info --governors you can see the governors and with cpupower frequency-info --governor <gov> you can set it.
– Facundo Victor
May 23 '16 at 18:21
add a comment |
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
This installs /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:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Reboot and repeat that cat
command to confirm still performance
add a comment |
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
This installs /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:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Reboot and repeat that cat
command to confirm still performance
add a comment |
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
This installs /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:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Reboot and repeat that cat
command to confirm still performance
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
This installs /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:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Reboot and repeat that cat
command to confirm still performance
edited May 20 '17 at 6:42
jasonwryan
50.4k14135189
50.4k14135189
answered May 20 '17 at 6:36
user237862user237862
111
111
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f182696%2fhow-to-get-current-cpupower-governor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown