Update runShell.sh

This commit is contained in:
SpudGunMan
2024-12-23 16:36:33 -08:00
parent 7ffa9d5309
commit 9cc8dd7143
+1
View File
@@ -8,6 +8,7 @@ program_path=$(pwd)
free_space=$(df -h | grep ' /$' | awk '{print $4}')
cpu_usage=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}')
ram_usage=$(free | grep Mem | awk '{print $3/$2 * 100.0}')
ram_free=$(echo "scale=2; 100 - $ram_usage" | bc)
# if command vcgencmd is found, part of raspberrypi tools, use it to get temperature
if command -v vcgencmd &> /dev/null