diff --git a/server-monitoring.sh b/server-monitoring.sh index f30fcf7..94a18b1 100644 --- a/server-monitoring.sh +++ b/server-monitoring.sh @@ -194,7 +194,7 @@ get_cpu_usage () { get_memory_usage () { local TOTAL_MEM=$( free -m | awk 'NR==2{print $2}' ) - local USED_MEM=$( free -m | awk 'NR==3{print $3}' ) + local USED_MEM=$( free -m | awk 'NR==2{print $3}' ) local USED_MEM_PERCENTAGE=$( bc <<< "100 * $USED_MEM / $TOTAL_MEM" ) echo "${USED_MEM_PERCENTAGE}" }