Contents

Simple Bash Script for Monitoring Raspberry Pi Temperature

Contents

The following script will monitor Raspberry Pi temperature.

#!/bin/bash
while [ : ]
do
        command=`/opt/vc/bin/vcgencmd measure_temp`
        echo $command
        sleep 3
done

The script will print the temperature every 3 seconds.

You can run vcgencmd measure_temp for one temperature check.

Change sleep 3 to other number for different intervals.