12-04-2013, 03:45 PM
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

