首页 > 技术相关 > Linux下查看并设置CPU频率

Linux下查看并设置CPU频率

2011年11月5日 发表评论 阅读评论

在Linux下,可通过cpufreq-info,cpufreq-info,cpufreq-selector等命令来查看以及设置CPU的频率。
这些命令加载了内核的acpi_cpufreq模块,可通过以下命令查看是否加载。

lsmod | grep "acpi_cpufreq"

其中cpufreq-info的输出示例信息如下:

analyzing CPU 7:
  driver: acpi-cpufreq
  CPUs which need to switch frequency at the same time: 7
  hardware limits: 1.20 GHz - 2.13 GHz
  available frequency steps: 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
  available cpufreq governors: ondemand, userspace, performance
  current policy: frequency should be within 1.20 GHz and 2.13 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz.

上面给除了当前CPU的频率范围,频率的策略,以及整个CPU可是设置的频率。
其中governor就是CPU频率的策略,上面列出的CPU有三种策略,onemand(表示系统可以通过动态调整频率,降低功耗,具体的调整策略和内核的功耗管理算法有关),userspace(表示用户可以自己设定cpu的频率),performance(表示CPU总是在最高主频下工作)。

可通过cpufreq-set以及cpufreq-selector来设置CPU的频率以及策略。
cpufreq-set的用法如下:

Usage: cpufreq-set [options]
Options:
  -c CPU, --cpu CPU        number of CPU where cpufreq settings shall be modified
  -d FREQ, --min FREQ      new minimum CPU frequency the governor may select
  -u FREQ, --max FREQ      new maximum CPU frequency the governor may select
  -g GOV, --governor GOV   new cpufreq governor
  -f FREQ, --freq FREQ     specific frequency to be set. Requires userspace
                           governor to be available and loaded
  -h, --help           Prints out this screen

cpufreq-selector的用法如下:

Usage: cpufreq-set [options]
Options:
  -c CPU, --cpu CPU        number of CPU where cpufreq settings shall be modified
  -d FREQ, --min FREQ      new minimum CPU frequency the governor may select
  -u FREQ, --max FREQ      new maximum CPU frequency the governor may select
  -g GOV, --governor GOV   new cpufreq governor
  -f FREQ, --freq FREQ     specific frequency to be set. Requires userspace
                           governor to be available and loaded
  -h, --help           Prints out this screen


本文作者: Sigma    在新浪微博关注SigmaSigmaWeibo    RSS订阅本博客
本文链接: http://www.sigma.me/2011/11/05/linux-cpufreq-info-and-set.html
本博客采用知识共享署名—非商业性-禁止演绎使用3.0协议进行许可,转载请保留作者和原文链接。

分类: 技术相关 标签: , , ,

  1. 2011年11月5日16:21 | #1

    你改用wordpress了哈,你用的新浪的空间?

    • 2011年11月5日16:25 | #2

      恩,GAE一两个小时就爆了,我没用新浪的空间,SAE绑定域名太麻烦了

  2. 2019年1月9日12:10 | #5

    I’m also writing to make you understand of the excellent encounter my girl found going through your blog. She realized numerous things, most notably how it is like to possess a great coaching character to let most people clearly completely grasp various problematic topics. You undoubtedly exceeded our own expected results. Many thanks for providing the invaluable, trustworthy, revealing not to mention fun thoughts on your topic to Ethel.

  3. 2019年1月10日08:58 | #6

    I’m writing to make you understand what a remarkable encounter my wife’s girl had browsing yuor web blog. She discovered a good number of pieces, with the inclusion of what it’s like to possess an ideal coaching spirit to have men and women with ease learn several tortuous topics. You actually exceeded her expected results. Thanks for rendering such good, safe, informative as well as fun tips about this topic to Gloria.

  4. 2019年1月11日05:02 | #7

    I truly wanted to jot down a remark to be able to appreciate you for all of the wonderful suggestions you are giving out at this website. My considerable internet investigation has at the end been paid with pleasant information to exchange with my friends and family. I would say that many of us site visitors actually are truly endowed to exist in a magnificent site with many brilliant people with good basics. I feel quite fortunate to have come across your entire web site and look forward to some more enjoyable moments reading here. Thanks a lot again for all the details.

  5. 2019年1月11日16:58 | #8

    My wife and i ended up being really lucky John could conclude his preliminary research out of the ideas he had while using the web pages. It is now and again perplexing to simply choose to be freely giving things other people may have been selling. And now we take into account we’ve got the writer to thank for that. The type of explanations you’ve made, the straightforward site navigation, the relationships you will make it easier to promote – it’s got all superb, and it’s letting our son in addition to us believe that that content is amusing, which is certainly truly essential. Thanks for all!

  6. 2019年1月12日00:49 | #9

    My wife and i ended up being quite thankful Emmanuel could finish up his survey from the ideas he discovered when using the site. It is now and again perplexing just to possibly be giving for free things which people have been trying to sell. And we all take into account we’ve got the blog owner to appreciate because of that. Those illustrations you made, the straightforward web site navigation, the relationships you aid to create – it is most fantastic, and it’s helping our son in addition to us consider that this content is entertaining, which is certainly particularly serious. Thank you for the whole thing!

  7. 2019年1月12日17:07 | #10

    Needed to write you one little bit of word to finally say thanks a lot as before over the pleasing methods you’ve featured at this time. This has been so shockingly generous of you to allow unreservedly what exactly a few people might have distributed for an ebook to help make some dough for their own end, particularly since you might well have done it if you desired. These good tips in addition served as the easy way to be sure that other individuals have a similar dreams just as mine to know great deal more on the subject of this matter. I know there are several more enjoyable moments in the future for individuals who looked over your site.

  8. 2019年1月14日07:21 | #11

    I as well as my friends were found to be looking at the good tips and hints located on your web blog and all of a sudden developed a horrible suspicion I never thanked the blog owner for those tips. These people had been as a result stimulated to read them and have in effect truly been using these things. Thank you for genuinely indeed helpful and also for getting some superb areas most people are really desirous to discover. Our honest regret for not saying thanks to you earlier.

  9. 2019年1月15日11:43 | #12

    I want to show appreciation to you for bailing me out of such a circumstance. Just after looking through the search engines and seeing opinions that were not powerful, I assumed my entire life was gone. Being alive devoid of the strategies to the issues you’ve solved by means of your good write-up is a critical case, and ones which may have adversely damaged my career if I hadn’t discovered the website. Your primary understanding and kindness in maneuvering all the details was vital. I don’t know what I would’ve done if I hadn’t discovered such a point like this. I’m able to at this moment look ahead to my future. Thanks for your time so much for this specialized and result oriented guide. I won’t be reluctant to endorse your web sites to any person who wants and needs tips about this problem.

  10. 2019年1月15日11:59 | #13

    My husband and i felt quite contented that Jordan managed to round up his basic research via the precious recommendations he was given out of the blog. It is now and again perplexing to just be giving for free information which others could have been selling. So we already know we now have the blog owner to be grateful to because of that. These illustrations you have made, the easy web site navigation, the friendships you will help to engender – it is many incredible, and it is making our son and our family do think that subject matter is interesting, which is especially mandatory. Thank you for the whole thing!

  11. 2019年1月16日06:05 | #14

    I precisely wanted to thank you very much yet again. I am not sure the things that I would’ve carried out without the actual tricks contributed by you about such industry. Previously it was a frightful crisis in my view, however , finding out the very well-written technique you dealt with the issue took me to cry with gladness. I will be happier for your assistance and as well , hope that you find out what a powerful job you happen to be doing teaching many others via your web site. Probably you have never met all of us.

  12. 2019年1月16日14:10 | #15

    Needed to post you one little word to say thanks as before for your exceptional views you’ve provided above. This has been simply pretty open-handed with you to supply without restraint all that many of us would have made available for an e-book in making some money for their own end, even more so considering the fact that you could have tried it in case you considered necessary. Those basics additionally acted to become fantastic way to be sure that other individuals have similar eagerness much like mine to see whole lot more pertaining to this condition. I believe there are some more pleasurable sessions in the future for individuals who see your website.

  13. 2019年1月17日01:06 | #16

    I and my buddies have already been going through the great tips and tricks located on your site then instantly developed a horrible suspicion I never expressed respect to you for those strategies. The people appeared to be for that reason very interested to see all of them and have now quite simply been enjoying those things. Thank you for simply being really considerate and also for getting this kind of incredible information most people are really needing to discover. Our honest regret for not saying thanks to sooner.

  14. 2019年1月17日08:56 | #17

    I would like to voice my admiration for your kind-heartedness supporting men and women that really need help on that niche. Your personal dedication to getting the message all over has been particularly beneficial and have in every case made people much like me to attain their aims. Your own valuable publication means much to me and even further to my colleagues. Warm regards; from all of us.

  15. 2019年1月17日17:38 | #18

    I wish to show my gratitude for your generosity in support of persons who must have help with in this concept. Your special commitment to passing the solution across came to be remarkably good and have without exception empowered some individuals just like me to realize their endeavors. Your amazing warm and helpful help signifies a great deal to me and extremely more to my peers. Many thanks; from all of us.

  16. 2019年1月18日03:40 | #19

    I have to point out my gratitude for your kindness for men and women who require help on this niche. Your personal commitment to passing the message all around appears to be quite important and have truly allowed men and women like me to realize their aims. Your entire insightful suggestions indicates this much a person like me and additionally to my colleagues. Best wishes; from everyone of us.

  17. 2019年1月18日08:24 | #20

    My husband and i got absolutely delighted that Albert could conclude his basic research from your ideas he was given out of the web site. It is now and again perplexing just to happen to be releasing secrets and techniques that many people have been trying to sell. And now we see we’ve got the writer to appreciate because of that. The most important explanations you made, the simple web site navigation, the relationships your site make it possible to foster – it’s got many spectacular, and it is leading our son in addition to us reckon that this concept is exciting, which is really fundamental. Thanks for everything!

  18. 2019年1月18日10:42 | #21

    Thank you for all of your effort on this site. Betty really loves conducting investigations and it’s easy to understand why. My spouse and i hear all about the powerful mode you render functional information on the website and in addition inspire participation from people on the content then our princess is always discovering a lot. Have fun with the rest of the new year. You’re the one conducting a fabulous job.

  19. 2019年1月18日18:32 | #22

    I would like to express some thanks to you for bailing me out of such a situation. After scouting throughout the world wide web and meeting principles which were not powerful, I figured my entire life was gone. Being alive minus the strategies to the issues you have resolved by means of your post is a serious case, and those that could have badly affected my career if I hadn’t come across the blog. That mastery and kindness in taking care of every aspect was invaluable. I’m not sure what I would have done if I hadn’t discovered such a subject like this. It’s possible to now look ahead to my future. Thanks for your time very much for your high quality and effective guide. I won’t hesitate to refer your web sites to any individual who ought to have counselling about this subject matter.

  20. 2019年1月19日02:35 | #23

    Thanks so much for providing individuals with remarkably nice opportunity to read from this web site. It is often so pleasing plus stuffed with a lot of fun for me and my office mates to visit your web site at the least thrice in one week to read the new items you have got. And lastly, we are actually satisfied with all the staggering tactics you serve. Some 2 areas on this page are surely the most efficient we have all ever had.

  21. 2019年1月19日04:00 | #24

    Thanks for your own efforts on this web site. My aunt really likes conducting research and it is obvious why. My partner and i know all concerning the dynamic way you deliver practical tips and hints on your website and inspire participation from people on this point plus my child is undoubtedly understanding a whole lot. Take pleasure in the rest of the new year. You are always conducting a wonderful job.

  22. 2019年1月19日10:49 | #25

    I precisely desired to thank you very much all over again. I’m not certain what I would’ve followed without those creative ideas discussed by you concerning such topic. Entirely was a hard condition in my view, but taking a look at your well-written strategy you managed it made me to jump for delight. I’m happy for your help and sincerely hope you comprehend what an amazing job you were carrying out training most people by way of a blog. I know that you have never got to know all of us.

  23. 2019年1月19日19:35 | #26

    I would like to express my thanks to the writer for rescuing me from this trouble. After looking through the online world and obtaining tricks which were not beneficial, I believed my entire life was gone. Being alive devoid of the strategies to the issues you’ve solved by means of this guide is a critical case, as well as those that might have badly affected my career if I hadn’t encountered your web page. Your good knowledge and kindness in maneuvering all the stuff was very helpful. I don’t know what I would have done if I had not come across such a stuff like this. I am able to at this point relish my future. Thanks a lot so much for this expert and sensible help. I will not be reluctant to recommend your web site to anybody who requires guide on this subject.

  24. 2019年1月20日04:43 | #27

    My husband and i were now joyful Peter could deal with his survey from your precious recommendations he had from your web site. It’s not at all simplistic to simply find yourself making a gift of key points some other people may have been making money from. We really fully understand we have you to thank because of that. The illustrations you’ve made, the easy web site menu, the friendships your site aid to engender – it’s got many terrific, and it’s facilitating our son and our family imagine that this matter is thrilling, and that is extremely pressing. Thank you for the whole thing!

  25. 2019年1月20日21:34 | #28

    Thank you for all of the effort on this website. Betty take interest in managing investigation and it is simple to grasp why. Many of us learn all regarding the dynamic mode you offer vital strategies through your web site and even inspire response from website visitors on this point then our favorite daughter has always been becoming educated so much. Enjoy the rest of the new year. You are doing a tremendous job.

  26. 2019年1月21日04:11 | #29

    A lot of thanks for each of your labor on this website. Kate take interest in getting into research and it’s really simple to grasp why. I learn all about the powerful manner you give both interesting and useful tactics on your website and therefore attract response from the others about this point plus our princess is truly being taught so much. Take advantage of the rest of the year. You’re the one performing a splendid job.

  27. 2019年1月21日12:14 | #30

    I must show some thanks to the writer just for rescuing me from this type of predicament. Because of looking throughout the the net and meeting things that were not pleasant, I thought my life was well over. Living without the presence of solutions to the problems you have resolved by means of your main short post is a critical case, as well as the kind which may have badly damaged my career if I had not discovered your site. Your good ability and kindness in handling the whole lot was valuable. I am not sure what I would’ve done if I had not encountered such a solution like this. I can also at this moment relish my future. Thank you very much for this expert and result oriented help. I will not be reluctant to recommend your blog to any individual who ought to have counselling about this matter.

  28. 2019年1月21日20:55 | #31

    I would like to show my thanks to this writer just for rescuing me from this situation. After looking throughout the world-wide-web and obtaining concepts which are not helpful, I figured my entire life was over. Living minus the answers to the problems you’ve sorted out through the website is a crucial case, and ones that might have badly damaged my career if I hadn’t noticed the website. Your natural talent and kindness in playing with every item was invaluable. I’m not sure what I would’ve done if I had not come upon such a thing like this. I’m able to at this moment relish my future. Thank you so much for your specialized and sensible help. I won’t be reluctant to refer your blog to any person who needs to have guide on this matter.

  29. 2019年1月22日06:18 | #32

    I and also my friends have already been digesting the best tips found on your site while suddenly developed an awful feeling I never expressed respect to the web site owner for them. These guys are already stimulated to read through them and have now extremely been taking pleasure in them. Appreciate your simply being well accommodating as well as for deciding on this kind of incredibly good guides most people are really wanting to be aware of. My very own honest regret for not expressing appreciation to sooner.

  30. 2019年1月22日14:30 | #33

    I have to get across my affection for your kind-heartedness for men and women who should have guidance on the content. Your very own dedication to getting the solution up and down came to be wonderfully valuable and has really made employees much like me to reach their dreams. Your warm and helpful help means a great deal a person like me and still more to my peers. Best wishes; from each one of us.

  31. 2019年1月23日00:38 | #34

    I would like to express my thanks to this writer just for bailing me out of this crisis. After looking through the internet and finding thoughts which are not powerful, I assumed my life was over. Being alive devoid of the solutions to the problems you’ve resolved through your good article content is a crucial case, and the kind that might have adversely damaged my career if I hadn’t discovered your web page. That ability and kindness in playing with all areas was crucial. I’m not sure what I would’ve done if I hadn’t discovered such a thing like this. I’m able to at this time relish my future. Thanks for your time very much for the expert and effective help. I won’t be reluctant to refer your web blog to anybody who wants and needs tips about this subject matter.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.

无觅相关文章插件,快速提升流量