Raspberry PI CPU Temperature and current speed – bash script


echo Raspberry Pi SysInfo.
echo ---------------------
MHZ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
TEMPE=$(cat /sys/class/thermal/thermal_zone0/temp)
TEMPS=$'\xc2\xb0'C

echo Hardware:
echo CPU Speed $(($MHZ/1000)) Mhz "|" CPU Temp $(($TEMPE/1000)) $TEMPS

output:


Raspberry Pi SysInfo.
---------------------
Hardware:
CPU Speed 850 Mhz | CPU Temp 28 °C

Advertisements

7 Comments on “Raspberry PI CPU Temperature and current speed – bash script”

  1. Yves Legault says:

    This script is working quite fine.

    Thanks.

  2. 28 degrees cpu!? mine does not drop bellow 50… 😦

  3. cs2guru says:

    its always showing 700..

    • atsch says:

      same here

    • lokir says:

      Hi.

      1. setup your PI like this: arm_freq=850
      2. open terminal one and type: watch PATH TO THE SCRIPT
      3 Open second terminal and type: apt-get update && apt-get install stress -y
      4. after instalation is done in terminal two type: stress -c 1
      5. watch terminal one cpu will jump to overclocked value.

  4. tartinesKiller says:

    Thanks, quite usefull and simple! 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s