2 # Massive Network Game Object Server
5 pid
=`ps ax | awk '($5 ~ /mangos-worldd/) { print $1 }'`
6 cpu
=`top -b -n 1 -p $pid | awk '($12 ~ /mangos-worldd/) { print $9 }'`
11 if [ "$intcpu" -gt "95" ]
14 echo "Killed MaNGOS for exceeding it's cpu limit."
15 echo `date` ", Killed MaNGOS for $intcpu% CPU Usage." >> serverlog
17 echo "MaNGOS Passes the cpu test."