Browse Source

Added cached memory varible

Will cause no error if "cached:" doesn't exist
pull/944/head
UltimateByte 9 years ago
committed by GitHub
parent
commit
c47626a82d
  1. 3
      lgsm/functions/info_distro.sh

3
lgsm/functions/info_distro.sh

@ -63,6 +63,7 @@ fi
physmemtotal=$(free ${humanreadable} | awk '/Mem:/ {print $2}')
physmemused=$(free ${humanreadable} | awk '/Mem:/ {print $3}')
physmemfree=$(free ${humanreadable} | awk '/Mem:/ {print $4}')
pysmemcached=$(free ${humanreadable} | awk '/cache:/ {print $4}')
swaptotal=$(free ${humanreadable} | awk '/Swap:/ {print $2}')
swapused=$(free ${humanreadable} | awk '/Swap:/ {print $3}')
swapfree=$(free ${humanreadable} | awk '/Swap:/ {print $4}')
@ -111,4 +112,4 @@ if [ -d "${backupdir}" ]; then
# size of most recent backup.
lastbackupsize=$(du -h "${lastbackup}" | awk '{print $1}')
fi
fi

Loading…
Cancel
Save