As per the specification. If you power the raspberry pi from the USB port from PC,It will run at half speed of what it can achieve. But when you power it from the external source then it runs at full speed of 700 MHz. So I want to ask how can we see the clock speed in real time ?
-
2Which specification is this? The USB port only connects the power lines, so there is no way it can tell that it's powered via a PC. Mine have always been powered from a USB port on a laptop and are able to run up to 1GHz with no problems.– John La RooyJun 29, 2013 at 9:29
-
USB 2.0 can at most provide 500mA of current at 5V. But according to the requirement from raspberry pi specification it requires 700mA of current to run at full speed. It depends upon whether you are using Ethernet (or) USB ports when powering from laptop. without using them your PI will run perfectly fine powered from laptop.– JimitJun 29, 2013 at 15:56
-
The 700mA is really just a guideline. Consider that the USB ports should be expected to supply 500mA each - that is obviously impossible with only 700mA. Anyway there is no graceful degrading - if there is not sufficient power the RPi will just crash or reboot.– John La RooyJun 30, 2013 at 2:49
2 Answers
There is a good summary of the CPU frequency scheduling interface for Linux. In short, you can run the following command to get the current frequency of your CPU:
sudo cat /sys/devices/system/cpu/0/cpufreq/cpuinfo_cur_freq
Update: With Raspian based on Debian 8.0 you can find it here:
pi@raspberrypi $ sudo find /sys -name '*cpuinfo_cur_freq*'
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq
-
-
The above answer is for an older Debian release. Updated answer with current information.– ArneOct 14, 2016 at 11:00
-
On a raspberry pi 4, the path has changed to /sys/devices/system/cpu/cpu$NUM/cpufreq/cpuinfo_cur_freq where NUM=0|1|2|3 Feb 17, 2021 at 20:29
You can get the clock speed from the command line with
lscpu | grep "MHz"
-
3