Seeing CPU freq as adjusted by governor (from command line)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Seeing CPU freq as adjusted by governor (from command line)
Hi. My Linux kernel is currently set to use the ONDEMAND cpu freq governor by default. However, I am wondering: how can I see what my actual cpu freq is at any given moment? I'd like to be able to see (and maybe record) how the governor is responding when I run or don't run certain applications, preferably from the command line.
/proc/cpuinfo always displays the same cpu MHZ value, so either that is not the actual speed, or the governor is not working. I don't use a DE, so don't bother asking which DE I use.
if it is not showing them cpufreq is not working. That shows the stat of the CPU as reported by the kernel, so it is dead on target whether working or not.
Last edited by corbintechboy; 03-05-2012 at 08:28 PM.
if it is not showing them cpufreq is not working. That shows the stat of the CPU as reported by the kernel, so it is dead on target whether working or not.
Okay, so I guess it isn't working, because all three CPUs show
Code:
cpu MHz : 3314.309
regardless of when I check. So then, the question is: why isn't it working?
I see these messages with dmesg, whatever they mean:
Code:
$ dmesg | grep gov
[ 1.201680] cpuidle: using governor ladder
[ 1.201799] cpuidle: using governor menu
I would try manually loading the kernel driver for your CPU and see if there are any errors. Then I would start cpufreq from the command line with the driver loaded and see if there are any errors.
Or you could look through dmesg and see if there are any errors. Are you starting cpufreq as a daemon? On Arch (or Chakra) I load the daemon in /etc/rc.conf and load the module under the modules section. Then I went to /etc/conf.d/cpufreq.conf (going off memory here) and set up the config file for on demand.
Other then those ideas I have none. I have not used Gentoo in ages and don't know the routine for it as well.
# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
Code:
I tried to start cpufreq:
# /etc/init.d/cpufreqd start
* cpufreqd requires the kernel to be configured with CONFIG_CPU_FREQ
* Make sure that the appropiate kernel drivers for your CPU are
* built-in or loaded.
* ERROR: cpufreqd failed to start
I knew I had enabled this, but just to be certain I rebuilt the kernel, making sure that this is enabled. But the cpufreq tools still give the same error message. I looked through dmesg output, but I couldn't find any error messages that were informative.
I use a static kernel, version 3.2.9 (x86_64). I have the on demand governor, performance governor, and user space governors built, with default set to on-demand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.