diff --git a/plugins/minecraft/minecraft-users-ram_ b/plugins/minecraft/minecraft-users-ram_ index d2cd2406..84b94e29 100755 --- a/plugins/minecraft/minecraft-users-ram_ +++ b/plugins/minecraft/minecraft-users-ram_ @@ -25,7 +25,7 @@ then #is running MEMORYRSS=$(ps -p ${MC_PID} -o rss | cut -d' ' -f2) MEMGiB=$(echo "scale=2;${MEMORYRSS}/1024/1024" | bc -l) - CPUPERCENT=$(ps -p ${MC_PID} -o %cpu | sed -n 2p) + CPUPERCENT=$(top -bp ${MC_PID} -n 1 | sed -n '$p' | tr -s ' ' | cut -d ' ' -f10) CPU=$(echo "scale=2;${CPUPERCENT}/100" | bc -l) else MEMGiB=0