新聞中心
CPU頻率,即CPU的時(shí)鐘頻率(也叫主頻),是指CPU運(yùn)算時(shí)的工作的頻率。CPU頻率決定了計(jì)算機(jī)的運(yùn)行速度,同級(jí)別的產(chǎn)品主頻越高越強(qiáng),一款CPU主頻越高,說(shuō)明單核性能就強(qiáng)。

Gnome下查看
\1) 在Gnome菜單欄的底部面板上點(diǎn)右鍵 —> 添加到面板 –> CPU頻率范圍監(jiān)視器 , 然后gnome面板上就會(huì)出現(xiàn)此小工具,并顯示當(dāng)前的頻率, 點(diǎn)左鍵可出現(xiàn)可調(diào)節(jié)的頻率
命令行下查看
\1) 安裝cpufrequtils 此軟件是查看cpu當(dāng)前頻率以及修改頻率、選擇cpu、選擇cpu運(yùn)行方式的。注意,只支持某些可調(diào)節(jié)頻率的cpu,如intel的筆記本cpu
sudo apt-get install cpufrequtils 或 yum install cpufrequtils
2)使用方法 cpufreq-info, cpufreq-selector, cpufreq-set。
a) 查看cpu類(lèi)型、當(dāng)前頻率、支持頻率、運(yùn)行模式等
[root@codeLife codeLife]# cpufreq-info -m
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
driver: powernow-k8
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 8.0 us.
hardware limits: 800 MHz – 2.90 GHz
available frequency steps: 2.90 GHz, 2.20 GHz, 1.70 GHz, 800 MHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 800 MHz and 2.90 GHz.
The governor “userspace” may decide which speed to use
within this range.
current CPU frequency is 800 MHz (asserted by call to hardware).
analyzing CPU 1:
driver: powernow-k8
CPUs which run at the same hardware frequency: 1
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 8.0 us.
hardware limits: 800 MHz – 2.90 GHz
available frequency steps: 2.90 GHz, 2.20 GHz, 1.70 GHz, 800 MHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 800 MHz and 2.90 GHz.
The governor “userspace” may decide which speed to use
within this range.
current CPU frequency is 800 MHz (asserted by call to hardware).
b)選擇需要調(diào)整的cpu
sudo cpufreq-selector -c cpu號(hào) 或者 sudo cpufreq-set -c cpu號(hào)
可能對(duì)雙核或多核cpu進(jìn)行選擇。我的不是雙核,沒(méi)法實(shí)驗(yàn),還請(qǐng)有duo core的朋友實(shí)驗(yàn)一下并跟帖匯報(bào)情況。
c)調(diào)整cpu頻率
sudo cpufreq-selector -f 你所需要的頻率 或者 sudo cpufreq-set -f 你所需要的頻率
注意,此處的頻率必須是以KHz為單位,并且是可以達(dá)到的頻率(也就是用cpufreq-info查看到的各個(gè)頻率),cpu頻率=倍頻x外頻。以下凡是涉及頻率的一律如此。
d)調(diào)整cpu頻率上下限
sudo cpufreq-set -d 頻率下限 sudo cpufreq-set -u 頻率上限
因此,可能可以對(duì)cpu進(jìn)行降頻或者超頻。有些人肯定會(huì)躍躍欲試的,嘿嘿。
e)調(diào)整cpu運(yùn)行模式
sudo cpufreq-selecotr -g 模式 或者 suod cpufreq-set -g 模式 這里,模式就是執(zhí)行cpufreq-info后看到的所支持的模式。比如我的支持以下幾種:powersave, userspace, ondemand, conservative, performance。
powersave, 是無(wú)論如何都只會(huì)保持最低頻率的所謂“省電”模式;
userspace, 是自定義頻率時(shí)的模式,這個(gè)是當(dāng)你設(shè)定特定頻率時(shí)自動(dòng)轉(zhuǎn)變的;
ondemand, 默認(rèn)模式。一有cpu計(jì)算量的任務(wù),就會(huì)立即達(dá)到最大頻率運(yùn)行,等執(zhí)行完畢就立即回到最低頻率;
conservative,翻譯成保守(中庸)模式,會(huì)自動(dòng)在頻率上下限調(diào)整,和ondemand的區(qū)別在于它會(huì)按需分配頻率,而不是一味追求最高頻率;
performance,顧名思義只注重效率,無(wú)論如何一直保持以最大頻率運(yùn)行。
12345
f)添加cpu監(jiān)視器
監(jiān)視cpu頻率的系統(tǒng)就有,右鍵單擊面板,選擇“添加到面板”,里面找到“cpu頻率范圍監(jiān)視器”。 另外,如果嫌命令行麻煩,可以這么做
sudo chmod +s /usr/bin/cpufreq-selector 然后,cpu頻率范圍監(jiān)視器的首選項(xiàng)里就會(huì)多出一個(gè)“頻率選擇器”,顯示菜單選擇“頻率和調(diào)速器”。鼠標(biāo)左鍵單擊cpu頻率范圍監(jiān)視器,會(huì)發(fā)現(xiàn)“頻率”和“調(diào)速器”兩個(gè)菜單,就可以隨便調(diào)了。在這里特別感謝Vstar。
監(jiān)視溫度的需要自己安裝,
sudo apt-get install sensors-applet 然后也是這樣添加到面板,名字叫“Hardware sensors monitor”。
當(dāng)前文章:Linux中查看并設(shè)置CPU頻率
文章源于:http://m.fisionsoft.com.cn/article/djeddsj.html


咨詢(xún)
建站咨詢(xún)
