您的位置:首页 > 其它

Ubuntu 下cpu的设置

2014-04-12 16:32 232 查看
安装cpufrequtils:

yu@ubuntu:~$ sudo apt-get install cpufrequtils


查看cpu的信息:

yu@ubuntu:~$ sudo cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 4294.55 ms.
hardware limits: 800 MHz - 1.90 GHz
available frequency steps: 1.90 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 1.90 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 800 MHz (asserted by call to hardware).
cpufreq stats: 1.90 GHz:-nan%, 1.80 GHz:-nan%, 1.60 GHz:-nan%, 1.40 GHz:-nan%, 1.20 GHz:-nan%, 1000 MHz:-nan%, 800 MHz:-nan%  (12092)
  analyzing CPU 1:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 1
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 4294.55 ms.
hardware limits: 800 MHz - 1.90 GHz
available frequency steps: 1.90 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 1.90 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 8http://i.cnblogs.com/EditPosts.aspx?opt=100 MHz (asserted by call to hardware).
cpufreq stats: 1.90 GHz:-nan%, 1.80 GHz:-nan%, 1.60 GHz:-nan%, 1.40 GHz:-nan%, 1.20 GHz:-nan%, 1000 MHz:-nan%, 800 MHz:-nan%  (13263)


从上面可以看到本机cpu的频率限制在800M~1.9GHZ之间。

可选设置频率有1.90GHz 1.80GHz 1.60GHz 1.40GHz 1.20GHz 1000MHz 800MHz

cpu对用的模式有5种:conservative, ondemand, userspace, powersave,performance

分别对应 自适应调节模式 自调节模式 用户(有root权限)自定义模式省电模式 最高或者最低频率

可参考:https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

设置cpu模式:sudo cpufreq-set -g {conservative | ondemand | userspace | powersave | performance }

设置cpu频率: sudo cpufreq-set -f {800~1900}(设置你的频率,使用cpufreq-info可以查看你的cpu支持哪些)

使用 cpufred-set -d 600M (最低) ,cpufreq-set -u 1.5G (最高)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: