SRCDS Steam group


Don't laugh--ok, nvm, you can laugh
#1
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.
Reply
#2
Well I'm not that familiar with doing this, but you might get on RCON and issue the command exit. That will kill SRCDS.
Reply
#3
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!
Reply
#4
I guess quit from the console will work, but I need a way to do it from putty in linux on the remote server.
Reply
#5
ps aux

then find the PID of the screen ( I presume your using screen), then

kill <PID>

eg kill 29867
Reply
#6
alternatively if you plan on running more than one server you could create user accounts for each server your going to run and then easily kill all processes under each user, like lets assume that you have a user called CSS_1 and you want to kill the CSS_1 server process, you could simply do :

# killall -u CSS_1

also if you find your server keeps on turning off when you exit putty (obviously xD) you can fix that by either doing

# nohup server start command here &

which will ignore signals from putty to stop the server, or you could use an alternative screen program like screen (to install it on centos its yum install screen)

hope it helps Toungue
Reply
#7
Moved this to Linux Smile
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#8
(12-15-2009, 01:23 PM)ilinx Wrote:  alternatively if you plan on running more than one server you could create user accounts for each server your going to run and then easily kill all processes under each user, like lets assume that you have a user called CSS_1 and you want to kill the CSS_1 server process, you could simply do :

# killall -u CSS_1

also if you find your server keeps on turning off when you exit putty (obviously xD) you can fix that by either doing

# nohup server start command here &

which will ignore signals from putty to stop the server, or you could use an alternative screen program like screen (to install it on centos its yum install screen)

hope it helps Toungue

Thanks--that's what I needed.

Also, installed and running screen--does the job.

It seems like when I reached the 4 or 5 server limit and didn't realize there was a limit and kept trying to start a server, it put those attempts in que and when I closed a server one of those in que started--is that right?

Is there a list somewhere of all rcon commands?
Reply
#9
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
Reply
#10
Heres a list of commandline options
http://developer.valvesoftware.com/wiki/Command_Line_Options , i think those are the rcon commands your referring too
Reply
#11
When I need to shut down a server I login with putty and type ps -C srcds_run then it should show all servers that are active then just kill <PID> and that should kill the screen aswell Toungue easy, fast and simple =)
Reply
#12
or if you use screen, simply connect to the screen of the server and hit ctrl+c
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#13
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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)