Advertisement
zefie

raspi cputemp

Oct 21st, 2014
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.50 KB | None | 0 0
  1. #!/bin/sh
  2. case $1 in
  3.     "temp")
  4.         vcgencmd measure_temp | sed "s/'//" | sed 's/temp\=//';
  5.     ;;
  6.  
  7.     *)
  8.         while (true); do
  9.             echo "$(printf '\r')CPU Temp: $(vcgencmd measure_temp) ($(($(vcgencmd measure_clock arm | cut -d'=' -f2)/1000000)) MHz, core $(($(vcgencmd measure_clock core | cut -d'=' -f2)/1000000)) MHz, emmc $(($(vcgencmd measure_clock emmc | cut -d'=' -f2)/1000000)) MHz, $(vcgencmd measure_volts core | cut -d'=' -f2))" | sed "s/'//" | sed 's/temp\=//' | tr -d '\n';
  10.             sleep 3;
  11.         done;
  12.     ;;
  13. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement