首先,你得确保你的电脑是支持并且打开了CPU动态调频功能的,方法如下:(我用的是的DELL机)(1)开机后进入BIOS,找到performance选项,在speedset子选项中你会看到你的CPU动态调频是否开启了,如果未开启,要开启。(2)查看你的内核是否安装了支持动态调频的模块:$cd sys/devices/system/cpu/cpufreq如果这个文件夹是空的,则说明你并没有安装相应的模块,否则,该文件夹下应该有ondemand文件夹。如果没有安装,则需要你手动安装了:$sudo apt-get install cpufrequtils(3)重启你的电脑,查看/sys/devices/system/cpu/cpufreq文件夹是否有了ondemand文件夹。如果你还是不确定,则可以运行如下的一个systemtap脚本:
- global times
- #probe kernel.function("do_dbs_timer@drivers/cpufreq/cpufreq_conservative.c") {
- probe kernel.function("do_dbs_timer") {
- times++
- }
-
- probe timer.ms(1000) {
- if(times) {
- printf("%s %d
", execname(), times)
- }
- }
这个脚本用来统计进入do_dbs_timer函数多少次,这个函数是负责CPU调频的,执行这个脚本 $sudo stap -v cpuload.stp 会有如下的运行 结果:
- sun@sun-pc:dbs_timer$ clear
-
- sun@sun-pc:dbs_timer$ sudo stap -v cpuload.stp
- Pass 1: parsed user script and 76 library script(s) using 24216virt/13692res/2276shr kb, in 130usr/20sys/146real ms.
- Pass 2: analyzed script: 3 probe(s), 1 function(s), 3 embed(s), 1 global(s) using 221608virt/33032res/3264shr kb, in 610usr/170sys/783real ms.
- Pass 3: using cached /home/sun/.systemtap/cache/70/stap_70945be0878032891000488a733f9b86_2071.c
- Pass 4: using cached /home/sun/.systemtap/cache/70/stap_70945be0878032891000488a733f9b86_2071.ko
- Pass 5: starting run.
- swapper/1 136
- swapper/1 272
- swapper/1 409
- swapper/1 544
- swapper/1 681
- swapper/1 816
- swapper/1 950
- swapper/1 1095
- swapper/1 1236
- Xorg 1397
- swapper/1 1543
- swapper/1 1679
- swapper/1 1815
- swapper/1 1951
- swapper/1 2087
Ubuntu下终端路径只显示当前目录如何配置CentOS默认安装的VNC服务相关资讯 Ubuntu系统教程
- 联想超极本Ubuntu系统无法开启无线 (04/11/2015 06:36:35)
- Ubuntu 更改文件夹权限 (02/04/2013 21:00:15)
- 去除DVSDK中的Ubuntu版本限制 (01/29/2013 09:04:07)
| - Ubuntu下映射网络驱动器 (07/05/2013 20:10:25)
- Ubuntu创建桌面快捷方式 (02/01/2013 15:53:27)
- Ubuntu 12.04下快捷键截图谷歌插件 (12/28/2012 10:53:36)
|
本文评论 查看全部评论 (0)