Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Current processor frequency?

by misc (Pilgrim)
on Aug 01, 2007 at 22:10 UTC ( #630174=note: print w/ replies, xml ) Need Help??


in reply to Current processor frequency?

On linux it's quite simple, the current cpu frequency is stored in the pseudofile /proc/cpuinfo,
in the line "^cpu MHz".

I have however no idea how one could get the freqeuency the processor is capable...


Comment on Re: Current processor frequency?
Replies are listed 'Best First'.
Re^2: Current processor frequency?
by Joost (Canon) on Aug 01, 2007 at 22:13 UTC
      perhaps it's not as easy I thought..

      to me it shows the current frequency, although I've got a smp kernel. (2.6.18)
      Google said the same for most users.
      e.g. http://docs.huihoo.com/gentoo/resources/document-listing/power-management-guide.html
      So I'd guess it's dependent on the kernel version, I wasn't able to find something more specific in the kernel documentation.
      A short research in the kernel sources didn't answer this, too.

      What google also told me..

      There is more info in the files
      /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
      /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
      /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq

      cpuinfo_cur_freq is only readable by root on my system, so this could lead again into problems.

      At least my question how the max frequency can be determined has been answered. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://630174]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-07-08 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls