#!/bin/bash

while :
do
  clear
  echo ""
  echo "Checks CPU throttled state and show GPU/CPU Temperature"
  echo "throttled state 0x0 means it is and has not been throttled since the last boot."
  echo ""
  echo "Press <CTRL+C> to exit."
  echo ""  
  cpu_raw=$(</sys/class/thermal/thermal_zone0/temp) 
  cpu=$((cpu_raw/1000))
  echo "throttled state is:"
  vcgencmd get_throttled | cut -d"=" -f2
  echo ""
  echo "CPU temp. is:" 
  echo "$cpu'C"
  echo ""
  echo "GPU temp. is:"
  vcgencmd measure_temp | cut -d"=" -f2
  sleep 1
done

