#!/bin/bash # Script: piSensorsTemp # Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3/4 # Author: Cédric Abonnel under CC BY # ------------------------------------------------------- echo "$(date) @ $(hostname)" echo "-------------------------------------------" echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)" echo "CPU => $(awk '{printf("temp=%.1f°C\n\n",$1/1e3)}' /sys/class/thermal/thermal_zone0/temp)"