Если в вашей системе не установлен gdb, то сервер при запуске черезСервер надо запускать с ключем -debug.
Если в системе установлен gdb,
./hlds_run
в консоли об этом скажет (при наличии параметра запуска -debug
)Enabling debug mode
-./hlds_run: 1: gdb: not found
-Please install gdb first.
-goto http://www.gnu.org/software/gdb/
Auto-restarting the server on crash
Console initialized.
ulimit -c unlimited
стандартные способы не подойдут:Enabling debug mode
-./hlds_run: 125: test: Illegal number: unlimited
Auto-restarting the server on crash
Console initialized.
/proc/sys/kernel/core_pattern
debugcore () {
# Debugs any core file if DEBUG is set and
# the exitcode is none 0
exitcode=$1
if test $exitcode -ne 0; then
if test -n "$DEBUG" ; then
echo "bt" > debug.cmds;
echo "info locals" >> debug.cmds;
echo "info sharedlibrary" >> debug.cmds
echo "info frame" >> debug.cmds; # works, but gives an error... must be last
echo "----------------------------------------------" >> $DEBUG_LOG
echo "CRASH: `date`" >> $DEBUG_LOG
echo "Start Line: $HL_CMD" >> $DEBUG_LOG
# check to see if a core was dumped
+ if test -f core ; then
+ CORE="core"
+ elif test -f core.`cat $PID_FILE`; then
+ CORE=core.`cat $PID_FILE`
+ elif test -f "$HL.core" ; then
+ CORE="$HL.core"
fi
+ if test -n "$CORE"; then
$GDB $HL $CORE -x debug.cmds -batch >> $DEBUG_LOG
fi
echo "End of crash report" >> $DEBUG_LOG
echo "----------------------------------------------" >> $DEBUG_LOG
echo $CRASH_DEBUG_MSG
rm debug.cmds
else
echo "Add \"-debug\" to the $0 command line to generate a debug.log to help with solving this problem"
fi
fi
}
cat /proc/sys/kernel/core_pattern
ulimit -c unlimited &&
#!/bin/sh
#
cd /home/omonas/ReHLDS2
HLDS_PORT=27015
HL="ulimit -c unlimited && ./hlds_run -binary ./hlds_linux -game cstrike +map de_dust2x2 +maxplayers 32 +sys_ticrate 1200 -pingboost 3 +port 27015 +ip server ip +rcon_password devcs -debug -pidfile hlds.18857.pid"
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
#$HL
nohup $HL | /usr/bin/cronolog /home/omonas/ReHLDS2/logs/cs.%y%m%d &
#nohup $HL 2>/dev/null 1>/dev/null &