diff --git a/entrypoint.sh b/entrypoint.sh index fed9a3e..87544b1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,7 +15,7 @@ fi # Execute JMeter command set -e -freeMem=`awk '/MemAvailable/ { print int($2/1024) }' /proc/meminfo` +freeMem=$(echo $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes ) / 1024 / 1024 | bc) [[ -z ${JVM_XMN} ]] && JVM_XMN=$(($freeMem/10*2)) [[ -z ${JVM_XMS} ]] && JVM_XMS=$(($freeMem/10*8))