Posts: 23
Threads: 3
Joined: Dec 2009
Reputation:
0
12-14-2009, 08:47 AM
(This post was last modified: 12-14-2009, 08:50 AM by URDead2.)
I'm a noob to hosting game servers, with a question I'm sure some of you will enjoy--managed to get my server going, np, in fact, I got 3 of them going--all working flawlessly--because I can't find the command anywhere for stopping a server, and I tried just running the start command again which added a new server.
Well, it's nice to know I can run multiple servers off one installation, but please, what is the command to stop and restart game servers.
I'd rather not reboot my box to do it.
Counter-Strike Source on Linux Debian, btw.
Thanks in advance.
Posts: 1,655
Threads: 38
Joined: Apr 2008
Reputation:
20
Well I'm not that familiar with doing this, but you might get on RCON and issue the command exit. That will kill SRCDS.
Posts: 2,440
Threads: 73
Joined: May 2009
Reputation:
33
I don't think there is a command for restarting a server... You can use "quit" which will kill the process, but other than that, there isn't a restart command.
Looking for a game server? Visit
fullfrag.com and pick one up as low as $2.50 / mo!
Posts: 23
Threads: 3
Joined: Dec 2009
Reputation:
0
12-14-2009, 05:36 PM
(This post was last modified: 12-14-2009, 05:36 PM by URDead2.)
I guess quit from the console will work, but I need a way to do it from putty in linux on the remote server.
Posts: 105
Threads: 5
Joined: Nov 2008
Reputation:
0
ps aux
then find the PID of the screen ( I presume your using screen), then
kill <PID>
eg kill 29867
Posts: 50
Threads: 10
Joined: Jul 2009
Reputation:
0
Ok, when you run the 'quit' command it kills the server, usually it will say something like 'server command "quit"' and then underneath it it will say something like 'server command "restart"' and that it should say "The server will restart in 10 seconds" if you leave it and do nothing it will restart in 10 seconds, if you do not want it to restart press Ctrl-C and that will Cancel the restart process.
If yours does not do this, then there is no restart command. My server does this for me every time i type quit, it restarts
Posts: 2,031
Threads: 27
Joined: Nov 2008
Reputation:
17
or if you use screen, simply connect to the screen of the server and hit ctrl+c
Posts: 23
Threads: 3
Joined: Dec 2009
Reputation:
0
Here's what I did:
I had more running than I thought besides the ones that showed on the server list. To find them I ran
ps -A | grep srcds_run
Running it on my server the results were:
17321 ? 00:00:08 srcds_run
18736 ? 00:00:16 srcds_run
25094 ? 00:00:07 srcds_run
10309 pts/2 00:00:00 srcds_run
13477 ? 00:00:08 srcds_run
4102 ? 00:00:05 srcds_run
23222 pts/0 00:00:00 srcds_run
25977 pts/6 00:00:00 srcds_run
19027 pts/10 00:00:00 srcds_run
though I had only 2 servers actually running.
I then used
kill -9 17321
then
kill -9 18736
and so on to kill every pid. Then I restarted my servers, making a note of the pid for each one so I would know which one I was killing in the future.