Browse Source

added physicalmemavailable n/a for older distros

pull/1936/head
Daniel Gibbs 7 years ago
parent
commit
acd39bfbcd
  1. 3
      lgsm/functions/info_distro.sh

3
lgsm/functions/info_distro.sh

@ -78,6 +78,9 @@ physmemtotalmb=$(free -m | awk '/Mem:/ {print $2}')
physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}') physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}')
physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}') physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}')
physmemavailable=$(free ${humanreadable} | awk '/Mem:/ {print $7}') physmemavailable=$(free ${humanreadable} | awk '/Mem:/ {print $7}')
if [ -z "${physmemavailable}" ]; then
physmemavailable="n/a"
fi
physmemcached=$(free ${humanreadable} | awk '/cache:/ {print $4}') physmemcached=$(free ${humanreadable} | awk '/cache:/ {print $4}')
if [ -z "${physmemcached}" ]; then if [ -z "${physmemcached}" ]; then
physmemcached=$(free ${humanreadable} | awk '/Mem:/ {print $6}') physmemcached=$(free ${humanreadable} | awk '/Mem:/ {print $6}')

Loading…
Cancel
Save