diff --git a/minecraft_ b/minecraft_ index 0353906..837d36b 100644 --- a/minecraft_ +++ b/minecraft_ @@ -18,8 +18,7 @@ PLAYERCOUNT=$(netstat -tn | grep -i ${MC_PORT} | grep ESTABLISHED | wc -l) MC_PID=$(netstat -tlpn | grep ${MC_PORT} | sed -n -e '1p' | awk '{ print $7 }' | cut -d'/' -f1) if [ ! -z "${MC_PID}" ] then #is running - MEMORYRSS=$(ps -p ${MC_PID} -o rss | cut -d' -' -f2) + MEMORYRSS=$(ps -p ${MC_PID} -o rss | grep -v RSS) MEMGiB=$(echo "scale=2;${MEMORYRSS}/1024/1024" | bc -l) else MEMGiB=0