Posts: 123
Threads: 30
Joined: Jan 2008
Reputation:
0
I need someone expirienced in linux to give me idea for a good start up script of the srcds server.
i need to do the following
run the server in gdb and when crashes to log the "bt" and restart the server again in gdb
I need this because my servers are crashing and hanging and i want to know what the cause is.
I will apreceate it if good script is given here to my needs
tnx in advance
Posts: 29
Threads: 2
Joined: Apr 2010
Reputation:
0
I have some difficulty understanding what you're doing here, with the broken english. If you are using a shell script or other script to run SRCDS/HLDS, please show us the script so we can help diagnose it. We can't really help much unless you do.
Personally, I just run it in a seperate screen section since it will restart on crash. ie,
screen ./hlds_run -game gearbox -maxplayers 32 +map op4_repent -pingboost 2
Posts: 1,127
Threads: 22
Joined: Sep 2008
Reputation:
10
I do not understand the question either, im just guessing. You want to run a server which puts logs in a file when it crashes? I would then put this in server.cfg
Code:
log on
sv_logfile 1(or logfile 1, cant clearly remember)
SlÄ den med jeres fiberforbindelser...
[IMG]*****www.speedtest.net/result/1308107839.png[/IMG]
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
04-23-2010, 04:47 PM
(This post was last modified: 04-23-2010, 04:48 PM by BehaartesEtwas.)
zhelev81: there is an easier way of doing this. usually srcds (like any other process on linux) creates a core file when crashing. (if not it might be disabled by your distribution. either have a look at /etc/security/limits.conf or check with your distro how to change it) you can load this core file with gdb at any time after the crash (i.e. gdb srcds core.<some_number>). core files usually are created in the same directory as the srcds executable.
btw: don't shout at the others, they probably just don't know what gdb is
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
I perfectly understand what you want to do... you can run the "bt" after the crash if you load the core file with gdb. gdb will reconstruct the state of the process right after the crash when loading the core file, so it will behave very much the same as if you were inside gdb right after the crash. At least for the backtrace there will be no difference.
*****www.fpsmeter.org
*****wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!