Skip to content

Commit

Permalink
Merge branch 'hotfix/v23.7.1' of https://github.com/GameServerManager…
Browse files Browse the repository at this point in the history
…s/LinuxGSM into hotfix/v23.7.1
  • Loading branch information
dgibbs64 committed Dec 10, 2023
2 parents 8bbb602 + 10b6807 commit f1b3bb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lgsm/modules/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi

# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM.
if [ "${ramrequirementgb}" ]; then
if [ "${physmemtotalgb}" -lt "${ramrequirementgb}" ]; then
if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
fn_print_dots "Checking RAM"
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
echo "* ${gamename} server may fail to run or experience poor performance."
Expand Down
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 f1b3bb7

Please sign in to comment.