[7289] Make quest related check work in case absent English localization in DB.
[getmangos.git] / src / mangosd / monitor-mangosd
bloba740ae5e8fab7c11413b5d19dc037bfbfa5d66fb
1 #!/bin/bash
2 # Massive Network Game Object Server
3 # Monitoring Script
5 pid=`ps ax | awk '($5 ~ /mangos-worldd/) { print $1 }'`
6 cpu=`top -b -n 1 -p $pid | awk '($12 ~ /mangos-worldd/) { print $9 }'`
7 #echo $pid
8 #echo $cpu
9 intcpu=${cpu%.*}
10 #echo $intcpu
11 if [ "$intcpu" -gt "95" ]
12 then
13 kill -9 $pid
14 echo "Killed MaNGOS for exceeding it's cpu limit."
15 echo `date` ", Killed MaNGOS for $intcpu% CPU Usage." >> serverlog
16 else
17 echo "MaNGOS Passes the cpu test."