From 9cc8dd7143308c23282ff48853ba38b73aa13d12 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Mon, 23 Dec 2024 16:36:33 -0800 Subject: [PATCH] Update runShell.sh --- runShell.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/runShell.sh b/runShell.sh index 7785d59..5dfc5a7 100644 --- a/runShell.sh +++ b/runShell.sh @@ -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