*Some final clean up. Now it should be the same as before.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-24 12:14:52 -06:00
parent fb2cb07d87
commit e41ff462fa
7 changed files with 62 additions and 170 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# Massive Network Game Object Server
# Monitoring Script
pid=`ps ax | awk '($5 ~ /mangos-worldd/) { print $1 }'`
cpu=`top -b -n 1 -p $pid | awk '($12 ~ /mangos-worldd/) { print $9 }'`
#echo $pid
#echo $cpu
intcpu=${cpu%.*}
#echo $intcpu
if [ "$intcpu" -gt "95" ]
then
kill -9 $pid
echo "Killed MaNGOS for exceeding it's cpu limit."
echo `date` ", Killed MaNGOS for $intcpu% CPU Usage." >> serverlog
else
echo "MaNGOS Passes the cpu test."
fi
+15
View File
@@ -0,0 +1,15 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by TrinityCore.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Trinity Server
# autorestart Script
while :
do
echo "TrinityCore daemon restarted"
echo `date` >> crash.log &
./mangosd | tail -n 20 >> crash.log
echo " " >> crash.log &
pid=`ps ax | awk '($5 ~ /trinitycore/) { print $1 }'`
wait $pid
echo `date` ", TrinityCore daemon crashed and restarted." >> serverlog
done