From 9559fa184be9cc7231298a7ff4e0a34c9a347ad7 Mon Sep 17 00:00:00 2001 From: chaos-zhu Date: Sun, 15 Mar 2026 20:53:38 +0800 Subject: [PATCH] fix: update shell --- server/app/shell/system-info.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/shell/system-info.sh b/server/app/shell/system-info.sh index 15c55a3..de448c7 100644 --- a/server/app/shell/system-info.sh +++ b/server/app/shell/system-info.sh @@ -174,8 +174,8 @@ main() { tcp_count=$(ss -tanH 2>/dev/null | wc -l | awk '{print $1}') udp_count=$(ss -uanH 2>/dev/null | wc -l | awk '{print $1}') - mem_total=$(awk '/MemTotal:/ {print $2*1024; exit}' /proc/meminfo 2>/dev/null) - mem_available=$(awk '/MemAvailable:/ {print $2*1024; exit}' /proc/meminfo 2>/dev/null) + mem_total=$(awk '/MemTotal:/ {printf "%.0f", $2 * 1024; exit}' /proc/meminfo 2>/dev/null) + mem_available=$(awk '/MemAvailable:/ {printf "%.0f", $2 * 1024; exit}' /proc/meminfo 2>/dev/null) mem_total=${mem_total:-0} mem_available=${mem_available:-0} mem_used=$((mem_total - mem_available))