From a44bcb15cfebf2152591f286c2add29d61ad2e34 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 30 Nov 2023 16:39:55 -0600 Subject: [PATCH 1/2] Move DEBUG_MEMORY output to beginning of init --- scripts/start-configuration | 6 ++++++ scripts/start-finalExec | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/start-configuration b/scripts/start-configuration index bd63055670e..51d64e3c00c 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -47,6 +47,12 @@ if [ ! -e /data/eula.txt ]; then writeEula fi +if isTrue "${DEBUG_MEMORY}"; then + log "Memory usage and availability (in MB)" + uname -a + free -m +fi + ########################################## # Setup RCON password diff --git a/scripts/start-finalExec b/scripts/start-finalExec index 7445dbc036b..6d5e640b341 100755 --- a/scripts/start-finalExec +++ b/scripts/start-finalExec @@ -192,12 +192,6 @@ if isTrue "${USE_SIMD_FLAGS}"; then " fi -if isTrue "${DEBUG_MEMORY}"; then - log "Memory usage and availability (in MB)" - uname -a - free -m -fi - if [[ ${INIT_MEMORY} || ${MAX_MEMORY} ]]; then log "Setting initial memory to ${INIT_MEMORY:=${MEMORY}} and max to ${MAX_MEMORY:=${MEMORY}}" if [[ ${INIT_MEMORY} ]]; then From c6a03bd492f979fd2de703dc0112ee95edde3633 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 30 Nov 2023 16:44:48 -0600 Subject: [PATCH 2/2] Fixed unbound variable --- scripts/start-configuration | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/start-configuration b/scripts/start-configuration index 51d64e3c00c..62e0b1b03c6 100755 --- a/scripts/start-configuration +++ b/scripts/start-configuration @@ -47,7 +47,7 @@ if [ ! -e /data/eula.txt ]; then writeEula fi -if isTrue "${DEBUG_MEMORY}"; then +if isTrue "${DEBUG_MEMORY:-false}"; then log "Memory usage and availability (in MB)" uname -a free -m