SRCDS Steam group


[Ubuntu] terminal closed but server still online
#1
I wanted to shutdown my SRCDS server so i closed the terminal.
but the server is still online and i cant find back the terminal.
Also tried to find it in the Systemmonitor but cant find it back.
How can i get it back?
Reply
#2
Kill the proces by looking up the PID of the SRCDS process in console:
ps -ef
Then end the process by:
kill -9 <PID>

Maybe you should install screen:
http://www.linuxdynasty.org/screen-howto-part-1.html

(or write a script that helps you start/ stop SRCDS)
Reply
#3
yes it worked thanks for your help =]
ill try to install screen tommorow. Big Grin
oh btw because i added -autoupdate it will restart over and over, and i started 5 servers how can i shut them down forever unless i start one up.
Reply
#4
tried renaming the folder and renaming srcds_amd none of those works, the servers keep restarting.
Any help would be appreciated.
Reply
#5
Some addition to this:

If you start your commandline with an amp "&" at the end, it means that this application will remain active after pressing STRG+C or Closing the terminal. If you don't want that, i.e. to test new server configurations, don't use the &.

i usually list the processes by typing: "ps uwx" this shows only the running processes of the current user. i never heard of the -ef parameter, but of course they might work too Wink

"kill #pid" is in most cases enough to shutdown a server, it means that the application will receive a term signal. by adding -9 to it, the application will get the kill signal. in most cases, you'll want to terminate your server with the normal "kill #pid" command and only use the -9 if the process doesn't respond at all. (happend only 2 times for me in ~3 years of gameserver administration)


//edit:

if your server keeps restarting, there might be the startscript still running. type ps uwx to find your startscript. until this startscript isn't terminated, the server will always be revived.
Reply
#6
(12-29-2009, 01:31 AM)_dp Wrote:  Some addition to this:

If you start your commandline with an amp "&" at the end, it means that this application will remain active after pressing STRG+C or Closing the terminal. If you don't want that, i.e. to test new server configurations, don't use the &.

i usually list the processes by typing: "ps uwx" this shows only the running processes of the current user. i never heard of the -ef parameter, but of course they might work too Wink

"kill #pid" is in most cases enough to shutdown a server, it means that the application will receive a term signal. by adding -9 to it, the application will get the kill signal. in most cases, you'll want to terminate your server with the normal "kill #pid" command and only use the -9 if the process doesn't respond at all. (happend only 2 times for me in ~3 years of gameserver administration)


//edit:

if your server keeps restarting, there might be the startscript still running. type ps uwx to find your startscript. until this startscript isn't terminated, the server will always be revived.

I think you can find all the start scripts with

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.

----------

Just tried

ps -C srcds_run

It works the same as

ps -A | grep srcds_run

but also shows a caption for the column, PID TTY TIME CMD

ps -ef shows all PIDS running on the server
Reply
#7
to kill a certain type of application, you can try killall srcds_run as well (see: http://linux.about.com/library/cmd/blcmdl1_killall.htm)

In most cases, your startscripts don't have srcds_run in their name, so you'll have to kill them by yourself.

Quote:making a note of the pid for each one so I would know which one I was killing in the future.
But you do know, that a process has a different pid everytime it gets started? Big Grin

"ps aux" also shows every entry with user and extended info. Usually just a matter of which you're more used to.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)