1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CPU Speed

Discussion in 'Linux & Open Source' started by Westyfield2, 1 Sep 2012.

  1. Westyfield2

    Capodecina

    Joined: 14 Dec 2005

    Posts: 12,488

    Location: Bath

    Linux n00b ahoy!

    In Windows it sometimes displays the CPU speed wrong as you've changed the multiplier but its just calculating the CPU speed based on the stock multiplier from the CPUID x current FSB (or if you've changed both the multiplier and the FSB it'll show a clock speed that's neither the real one or the stock one!). If you use CPU-Z it gets the actual clock speed as it polls for the current multiplier as-well as the current FSB.

    The two Linux commands I know of are /proc/cpuinfo and lscpu.

    If the CPU is running overclocked or underclocked, will /proc/cpuinfo and lscpu be reading out the actual current clock speed? Or will they be reading out the stock clock speed based on the CPUID?

    I want to read out the actual current clock speed whether it's stock/underclocked/overclocked (so SpeedStep/Cool 'n' quiet features might have turned it down etc).
     
  2. Disco Boy

    Soldato

    Joined: 4 Aug 2009

    Posts: 5,310

    Location: London

    /proc/cpuinfo prints info about the CPU such as the make and model number etc. So I doubt very much indeed that it will change if you over lock your CPU.

    I've also never noticed it giving a reduced value when a processor is idle. (so speedstep is likely on).
     
  3. Westyfield2

    Capodecina

    Joined: 14 Dec 2005

    Posts: 12,488

    Location: Bath

    Ah okay, thanks.

    Any ideas anyone what command will print out the actual current CPU speed inclusive of overclocks etc like CPU-Z on windows?
     
  4. masterluke

    Wise Guy

    Joined: 24 Oct 2002

    Posts: 2,417

    Location: Cork, Ireland

    What distro are you on?

    I know pre-unity ubuntu had a very handy taskbar applet which showed the current frequency and let you get it to any of the speedstep speeds.

    ..once they moved to gnome3 i think these sort of applets stopped working.
     
  5. Disco Boy

    Soldato

    Joined: 4 Aug 2009

    Posts: 5,310

    Location: London

    I looked for one a while back but didn't find anything. So report back please if you do!
     
  6. Hairybudda

    Wise Guy

    Joined: 3 Sep 2005

    Posts: 1,655

    Location: Glasgow, Scotland

    cat /proc/cpuinfo | grep MHz

    I've used that for years and it's never given me an inaccurate reading.
     
  7. Westyfield2

    Capodecina

    Joined: 14 Dec 2005

    Posts: 12,488

    Location: Bath

    It's an old version of Debian, Sarge IIRC.
     
  8. JHeaton

    Mobster

    Joined: 19 Dec 2009

    Posts: 2,669

    Location: Lancashire

    If cpufrequtils is available in the repos, you could install that and run cpufreq-info. That should give you the CPU frequency, if I remember rightly. I'm not sure how else you would do it if not using one of the methods already mentioned, though.
     
  9. masterluke

    Wise Guy

    Joined: 24 Oct 2002

    Posts: 2,417

    Location: Cork, Ireland

    Are you running x? What desktop. Environment?
     
  10. Westyfield2

    Capodecina

    Joined: 14 Dec 2005

    Posts: 12,488

    Location: Bath

    Nope, running headless and just SSH in. Reason is it's actually a Netgear ReadyNAS NAS unit... apparently it's not even stock Debian but Netgear have fiddled around with it a bit!