Skip to content

Commit

Permalink
fix: added missing variable physmemtotalgb
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Dec 10, 2023
1 parent ddd3056 commit e90a68a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lgsm/modules/info_distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,16 @@ else
else
humanreadable="-h"
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
physmemfree="$(free ${humanreadable} | awk '/Mem:/ {print $4}')" # string
physmemused="$(free ${humanreadable} | awk '/Mem:/ {print $3}')" # string

oldfree="$(free ${humanreadable} | awk '/cache:/')"
if [ "${oldfree}" ]; then
physmemavailable="n/a"
physmemcached="n/a"
physmemavailable="n/a" # string
physmemcached="n/a" # string
else
physmemavailable="$(free ${humanreadable} | awk '/Mem:/ {print $7}')" # string
physmemcached="$(free ${humanreadable} | awk '/Mem:/ {print $6}')" # string
Expand Down

0 comments on commit e90a68a

Please sign in to comment.