From 5e737a997a40a337b85d88f4d0a54fdfdc751fdb Mon Sep 17 00:00:00 2001 From: UltimateByte <robin.labadie@gmail.com> Date: Sat, 22 Oct 2016 17:07:46 +0200 Subject: [PATCH] Should fix missing cached mem #1143 Please, test on ubuntu to confirm it's working --- lgsm/functions/info_distro.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 3416e8133..df079567d 100644 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -73,6 +73,9 @@ physmemtotalmb=$(free -m | awk '/Mem:/ {print $2}') physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}') physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}') physmemcached=$(free ${humanreadable} | awk '/cache:/ {print $4}') +if [ -z "${physmemcached} ]; then + physmemcached=$(free ${humanreadable} | awk '/Mem:/ {print $5}') +fi swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}') swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}') swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}')