auto restarter (LINUX)
#6

run2

#!/bin/bash

while ( : ) do
DATE=`date`
if [ -r .shutdown ]; then
rm -f .shutdown
fi

gdb --batch --command=cmd ./GameServer_d > "bt_`date +%y%m%d%H%M%S`.log"

DATE2=`date`
if [ -r .shutdown ]; then
echo "***** Shutdown $DATE ~ $DATE2" >> rebootlog
exit
fi

echo "!!!!! Reboot $DATE ~ $DATE2" >> rebootlog
sleep 2
done

cmd

handle SIGPIPE nostop
r
echo "-------------------------------------------"
echo "error--------------------------------------"
echo "-------------------------------------------"
thread
echo "-------------------------------------------"
echo "thread 1 - Game Thread---------------------"
echo "-------------------------------------------"
thread 1
bt full
echo "-------------------------------------------"
echo "thread 2 - Thread Library------------------"
echo "-------------------------------------------"
thread 2
bt full
echo "-------------------------------------------"
echo "thread 3 - DB Thread ----------------------"
echo "-------------------------------------------"
thread 3
bt full

use these 2 files.
Start with using run
the cmd is just a command file for GDB
if u dont have gdb: yum install gdb

This will also make a debug log if the server crashes
 



Messages In This Thread
[No subject] - by MrBuSta - 12-03-2013, 10:03 PM
[No subject] - by Walletman987 - 12-03-2013, 11:11 PM
[No subject] - by MrBuSta - 12-04-2013, 06:13 AM
[No subject] - by LikeToMove - 12-04-2013, 10:35 AM
[No subject] - by MrBuSta - 12-04-2013, 03:08 PM
[No subject] - by Wizatek - 12-04-2013, 03:45 PM
[No subject] - by MrBuSta - 12-04-2013, 04:13 PM
[No subject] - by CDWriter - 12-05-2013, 03:22 AM
[No subject] - by MrBuSta - 12-09-2013, 03:24 PM
[No subject] - by MrBuSta - 12-09-2013, 03:25 PM
[No subject] - by luoo - 12-10-2013, 03:23 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)