Page 1 of 1

Temperature script

Posted: Tue 1 Jan 2019 06:18
by harvey
Here's a script to check the CPU and GPU temps while in Emulationstation.
(You can also SSH and copy and paste these commands.)

If in RetroPie, drop to the command line (F4) and type:

nano /home/pi/RetroPie/retropiemenu/Check\ Temperature.sh

(This will open a text editor where you will then type:)

#!/bin/bash
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$(date) @ $(hostname)"
echo "-------------------------------------------"
echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)"
echo "CPU => $((cpu/1000))°C"
sleep 5


Then press 'ctrl+o' to save, 'enter' to confirm and 'ctrl+x' to exit back to the command line.

Now you make the script executable by typing:

chmod +x /home/pi/RetroPie/retropiemenu/Check\ Temperature.sh

(All that's left is to restart Emulation Station by typing:)

emulationstation

If you want to erase the script, here is the command:
rm /home/pi/RetroPie/retropiemenu/Check\ Temperature.sh

Re: Temperature script

Posted: Tue 12 Mar 2019 15:28
by Admin
Nice! Thanks for sharing