Created
January 25, 2020 16:56
-
-
Save mill1000/4b0e7c80513bbeae8fbd07fca59b8dbe to your computer and use it in GitHub Desktop.
raspibanmonitor - Raspberry Pi 3 Monitor Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Continuously queries RPi3 GPU for temperature, clock rates and throttled status | |
# Original from https://www.raspberrypi.org/forums/viewtopic.php?t=244320 | |
echo -e "Time Temp CPU Core Health Vcore" | |
while true ; do | |
Temp=$(vcgencmd measure_temp | cut -f2 -d=) | |
Clockspeed=$(vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f",$2/1000000); }' ) | |
Corespeed=$(vcgencmd measure_clock core | awk -F"=" '{printf ("%0.0f",$2/1000000); }' ) | |
Health=$(vcgencmd get_throttled | awk -F"=" '{printf("0x%08x\n",$2)}') | |
CoreVolt=$(vcgencmd measure_volts | cut -f2 -d=) | |
echo -ne "$(date '+%H:%M:%S') ${Temp} $(printf '%4s' ${Clockspeed})MHz $(printf '%4s' ${Corespeed})MHz ${Health} ${CoreVolt}" \\r | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment