Created
September 26, 2013 08:28
-
-
Save GregPK/6711385 to your computer and use it in GitHub Desktop.
Simple load and temperature monitor for my HTPC box.
Originally used to measure efficiency of GPU drivers (integrated into the CPU) and the noise they make (fan speed)
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 | |
while [ true ]; do | |
echo -n `date '+%Y-%m-%d_%H:%M:%S'` ; | |
echo -n ' '; | |
awk '{print $1,$2,$3}' /proc/loadavg | tr -d '\n'; | |
echo -n ' '; | |
sensors | grep fan1 | tr -d '\n' | awk '{printf $2}'; | |
echo -n ' '; | |
sensors | grep temp1 -m 1 | tr -d '\n' | awk '{gsub(/[C°\+\^]/,"")}; {printf $2}'; | |
echo -n ' '; | |
sensors | grep temp2 -m 1 | awk '{gsub(/[C°\+\^]/,"")}; {print $2}'; | |
sleep 5; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment