Browse Source

fix: added missing variable physmemtotalgb

pull/4407/head
Daniel Gibbs 2 years ago
parent
commit
e90a68aa53
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 7
      lgsm/modules/info_distro.sh

7
lgsm/modules/info_distro.sh

@ -195,15 +195,16 @@ else
else else
humanreadable="-h" humanreadable="-h"
fi fi
physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # string physmemtotalmb="$(free -m | awk '/Mem:/ {print $2}')" # integer
physmemtotalgb="$(free -m | awk '/Mem:/ {print $2}')" # integer
physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string physmemtotal="$(free ${humanreadable} | awk '/Mem:/ {print $2}')" # string
physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string
physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string
oldfree="$(free ${humanreadable} | awk '/cache:/')" oldfree="$(free ${humanreadable} | awk '/cache:/')"
if [ "${oldfree}" ]; then if [ "${oldfree}" ]; then
physmemavailable="n/a" physmemavailable="n/a" # string
physmemcached="n/a" physmemcached="n/a" # string
else else
physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string
physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string

Loading…
Cancel
Save