Clock Speed and Temperature: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
(Created page with "To monitor the temperature and clock speed of a Raspberry Pi <pre> vi /bin/stats </pre> <pre> #!/bin/bash #!/bin/bash echo echo echo ' Date Time Nano Sec Temp Hz'...")
 
No edit summary
 
Line 5: Line 5:


<pre>
<pre>
#!/bin/bash
#!/bin/bash
#!/bin/bash



Latest revision as of 02:59, 3 July 2021

To monitor the temperature and clock speed of a Raspberry Pi

vi /bin/stats
#!/bin/bash

echo
echo
echo '   Date    Time     Nano Sec  Temp Hz'

while true; do
  temp=$(vcgencmd measure_temp | cut -d= -f2 | cut -b -4)
  clock=$(vcgencmd measure_clock arm | cut -d= -f2)

  echo -ne $(date +'%Y-%m-%d %H:%M:%S %N') $temp $(($clock/1000000)) \\r
  sleep .2
done
 chmod +x /bin/stats 
 stats 

Allow a Maximum of 2GHz for the CPU clock speed on the Raspberry Pi.

vi /boot/config.txt
#uncomment to overclock the arm. 700 MHz is the default.
over_voltage=6
arm_freq=2000