CPU frequency set under linux

cpufreq-set -c 0 -g powersave

We need to install cpufrequtils. This software is a cpu to view and modify the current frequency of the frequency, select the cpu, cpu selected operating mode. Note that only support certain adjustable frequency cpu, such as a notebook cpu intel. May be able to overclocking, did not dare to experiment, try a good man.
sudo apt-get install cpufrequtils
Instructions
cpufreq-info, cpufreq-selector, cpufreq-set。
Specific usage can be seen man, or added to the command -h.
such as
man cpufreq-info
or
cpufreq-info -h
1. View cpu type, current frequency, frequency support, operation mode and so on.
cpufreq-info
This is the case in my cpu powersave mode
zhuqin @ ubuntu: ~ $ cpufreq-info 
cpufrequtils 002: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to [email][email protected][/email]">[email protected], please.
analyzing CPU 0:
driver: centrino
CPUs which need to switch frequency at the same time: 0
hardware limits: 798 MHz - 1.73 GHz
available frequency steps: 1.73 GHz, 1.73 GHz, 1.73 GHz, 1.73 GHz, 1.73GHz, 1.73 GHz, 1.73 GHz, 1.33 GHz, 1.06 GHz, 798 MHz
available cpufreq governors: powersave, userspace, ondemand, conservative, performance
current policy: frequency should be within 798 MHz and 1.73 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency is 798 MHz.
2. Select the preferred cpu
sudo cpufreq-selector -c cpu号
or
sudo cpufreq-set -c cpu号
Binuclear or multinuclear possible to select cpu. I was not dual-core, not experimental, please also have friends duo core experiment a bit and thread to report the situation.
3. Cpu frequency adjustment
sudo cpufreq-selector -f frequency you need
or
sudo cpufreq-set -f frequency you need
Note that here must be based KHz frequency as a unit, and is achievable frequency (that is, with a view to cpufreq-info each frequency), cpu frequency = FSB x multiplier. The following frequencies shall be so all involved.
4. Adjusting the frequency of the upper and lower cpu
sudo cpufreq-set -d frequency limit
sudo cpufreq-set -u frequency cap
Therefore, it may be possible to down-cpu or overclocking. Some people will certainly try, hehe.
5. Adjust cpu operating mode
sudo cpufreq-selecotr -g mode
or
suod cpufreq-set -g mode
Here, the model is supported mode after execution cpufreq-info to see. For example, I support the following: powersave, userspace, ondemand, conservative, performance.
powersave, is in any case will only maintain a minimum frequency of so-called "power-saving" mode;
the userspace, custom mode frequency, this is when you set the automatic transition of a specific frequency;
ondemand, the default mode. There are a cpu computational tasks, it will immediately reach the maximum frequency of operation, and other finished immediately to the lowest frequency;
conservative, translated into a conservative (moderation) mode, it will automatically adjust the lower limit on the frequency, and the difference is that it will ondemand frequency on demand, rather than blindly pursue the highest frequency;
performance, efficiency focus only on the name implies, in any case kept running at maximum frequency.
6. Adding cpu monitor
Cpu frequency monitoring system there, right-click the panel and select "Add to Panel", which found "cpu frequency range of the monitor."
In addition, if too cumbersome command line, you can do so
sudo chmod +s /usr/bin/cpufreq-selector
Then, preferences cpu frequency range where the monitor will be more of a "frequency selector", display the menu selection "and frequency governor." Left-click the cpu frequency range of the monitor, you will find "Frequency" and "governor" two menus, you can easily tune. Special thanks Vstar.
Need to monitor the temperature of their installation,
sudo apt-get install sensors-applet
Then also add to this panel, called "Hardware sensors monitor".

A power-saving software
PowerTOP

Reproduced in: https: //www.cnblogs.com/parrynee/archive/2010/05/06/1728737.html

Guess you like

Origin blog.csdn.net/weixin_33735077/article/details/93447579