From 0787fda2264268615fceb64c60aba47a6ff56cc9 Mon Sep 17 00:00:00 2001 From: simylein <67859356+simylein@users.noreply.github.com> Date: Sun, 14 Mar 2021 00:29:02 +0100 Subject: [PATCH] get free memory on linux in bytes --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 3694588..5c395ee 100644 --- a/setup.sh +++ b/setup.sh @@ -31,7 +31,7 @@ if [ "$(uname)" == "Darwin" ]; then fi elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then # get free memory on linux - memory="$(free | tail -2 | head -1 | awk '{print $4}')" + memory="$(free -b | tail -2 | head -1 | awk '{print $4}')" # check memory if (( ${memory} < 2560000000 )); then echo "$(tput bold)$(tput setaf 3)warning: your system has less than 2.56 GB of memory - this may impact server performance!$(tput sgr0)"