65

I've been trying to get an accurate reading of my Raspberry Pi's MHz, since I overclocked it in /boot/config.txt

My /boot/config.txt is as following:

pi@raspbmc:~$ cat /boot/config.txt 
arm_freq=900
gpu_freq=350
disable_overscan=1

List of things I already tried:

  1. Look at the /proc/cpuinfo - No MHz listed, does have BogoMIPS at 697, while CPU speed is set at 900.
  2. The sysstat package - returns 0.00 MHz.
  3. cpufreq-info: no or unknown cpufreq driver is active on this CPU

Any ideas?

Jivings
  • 22,538
  • 11
  • 90
  • 139
Sjaak Trekhaak
  • 963
  • 2
  • 7
  • 13
  • There must be a register somewhere that will give you the clock speed. – Alex Chamberlain Jul 26 '12 at 19:42
  • Note that the instructions that came with my Pi explicitly mentioned that overclocking might make some components too warm. – Thorbjørn Ravn Andersen Jul 28 '12 at 16:20
  • Why did you change the title to something irrelevant to the question? I've rolled the change back until you explain because it made no sense to me. – Jivings Jul 30 '12 at 07:34
  • @Jivings: It doesn't cover the load anymore. My question received an answer on how to determine the MHz, as well as fixing issues with /config/boot.txt. Perhaps you can set a better title? – Sjaak Trekhaak Jul 30 '12 at 09:28
  • What do you mean? This question has already been answered. You've accepted otakun85's answer as correct. If you have another question then ask a new one. – Jivings Jul 30 '12 at 11:04

6 Answers6

65

Updated (much has changed):

BogoMIPS is not useful for the new ondemand overclock config in raspi-config. It will provide 697 (which means 700MHz here) if you overclocked to 1GHz, because it is still in idle mode. 800 MHz are about 795.44 BogoMIPS .

maximum CPU frequence (e.g. when your CPU is under load)

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

minimum CPU frequence (when your CPU is idle)

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq

current CPU frequence:

sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

If this doesn't exist, then your Raspbian is outdated. Try updating it using apt-get update and apt-get upgrade


Overclock: Nowadays you can easily overclock the Pi with the help of raspi-conf to ondemand 1GHz at maximum, your pi may fail to boot afterwards.

keiki
  • 1,628
  • 1
  • 17
  • 18
  • 3
    BogoMIPs is not a very good indicator of performance. There must be a better way. – Alex Chamberlain Jul 23 '12 at 20:33
  • @AlexChamberlain It is not a good indicator of performance, but is a good indicator of clock speed. Otherwise there is no substitute for running benchmarking code. – Darren Wilkinson Jul 23 '12 at 21:05
  • I tried the above, but to no result. The BogoMIPS keeps staying at 697. – Sjaak Trekhaak Jul 25 '12 at 08:14
  • 1
    @SjaakTrekhaak Did you reboot after changing the config? I have tried this and the BogoMIPS is always just under the clock speed I set in the config. – Darren Wilkinson Jul 25 '12 at 08:22
  • @darrenjw I have rebooted several times, including using the tips stated above :( – Sjaak Trekhaak Jul 25 '12 at 08:28
  • Maybe you have an error with the linefeed? Someone reported a problem with it at http://raspberrypi.stackexchange.com/questions/1242/config-txt-with-multiple-lines-not-working – keiki Jul 25 '12 at 10:10
  • @otakun85 Already verified that linefeeds are correct – Sjaak Trekhaak Jul 25 '12 at 12:25
  • BogoMIPS are no god to compare different architectures, but will give you good information if you overclock the hardware. You are comparing performance on same machine. – Anders Jul 25 '12 at 21:17
  • @SjaakTrekhaak Have you tried installing a fresh config.txt from the image and adding or uncommenting the lines? – keiki Jul 26 '12 at 09:38
  • @otakun85 yes, several times. So weird it doesn't work. – Sjaak Trekhaak Jul 27 '12 at 08:07
  • 1
    @SjaakTrekhaak Maybe you should try something posted here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=11810 – keiki Jul 27 '12 at 12:09
  • @otakun85 Thanks for that link. I just tried something sovut posted there... with no physical access to the RPi. I just rebooted it and now its not responding anymore so I guess something has changed hahaha. Will check when I get home :D. – Sjaak Trekhaak Jul 27 '12 at 14:11
  • @SjaakTrekhaak maybe it did work and you got a kernel panic with 900 Mhz. Try 800 instead thats safe for most pis. – keiki Jul 27 '12 at 16:30
  • @otakun85 Its working! Thanks for the thread you posted; http://www.raspberrypi.org/phpBB3/viewtopic.php?p=133342&sid=85dd473b57447209cb39f2ef3fef183c#p133342 . Can you post this as answer, or a cp of the thread? I'll reward you with the points! Currently running with 900 bogomips :D – Sjaak Trekhaak Jul 27 '12 at 19:39
16
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

That will give you your current speed in kHz. Divide by 1000 to get MHz.

taxilian
  • 103
  • 3
gatesphere
  • 161
  • 1
  • 2
9

I don't have a Pi running atm, but this command exists in my raspbian chroot. This is on my quad core desktop, which is currently somewhat idle so it takes in the governor setting (don't know whether this is available on the pi, i suppose not)

$ lscpu 
....
CPU-frequentie (MHz):  800.000
BogoMIPS:              5800.03
...

Another one, with some caveats: this does is not very reliable as it uses information reported by the bios and it is not available in the current raspbian wheezy repository (i'm posting because maybe it will someday):

$ sudo dmidecode  | egrep "Max Speed|Current Speed"
Max Speed: 2900 MHz
Current Speed: 2900 MHz
Joost
  • 791
  • 7
  • 13
  • 3
    lscpu doesn't work. The 800Mhz you have are the FSB of your quad core(I think). On Rasp I get the following: Architecture: armv6l Byte Order: Little Endian CPU(s): 1 On-line CPU(s) list: 0 – keiki Jul 26 '12 at 18:10
  • 2
    dmidecode is not available; E: Package 'dmidecode' has no installation candidate – Sjaak Trekhaak Jul 27 '12 at 08:06
2

If you want to see the frequency in real time, I recommend using this command:

watch -n1 vcgencmd measure_clock arm

When overclocking, usually the temperatures also matter a lot, so this would be the command to read those:

watch -n1 vcgencmd measure_temp

Usually, you will see the clock being on a static level (around 600MHz when using the Pi 4), but if you open up another shell and run a sysbench, you will see the clock going for the maximum frequency. I hope this helps ^^

1

For 4 Cores Raspberry Pi 3B

find /sys/devices/system/cpu/cpu[0-3]/cpufreq/scaling_cur_freq  -type f | xargs cat | sort | uniq -c
user53157
  • 11
  • 1
-4

You can type sudo raspi-config in LXTerminal, use the arrow keys to navigate to "Overclock" and hit enter, hit enter again, and look at the MHz section under None. You're done!

Jacobm001
  • 11,898
  • 7
  • 46
  • 56