Main Menu

Server restarts

Started by Whitey, March 22, 2007, 06:48:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Whitey

Would it be possible to start our Source servers using the following method, at least then the rcon admins could restart the server when it has issues without the need to bother OB/BB/TL:

QuoteExtra) Restarting srcds at crash
Batch files are little script files that tell Windows what to do. If srcds crashes, it will not restart like possible under Linux. (Linux uses a "Script" file too)
What we are going to do is make sure that as soon HLDS suddenly quits it will restart. First we open notepad. What we write in there is the following:
 Command(s):@echo off
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds.com Watchdog
:srcds
echo (%time%) srcds started.
start /wait [U]srcds.exe -console -game cstrike +map de_dust +maxplayers 16[/U]
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds
Replace the marked part with your own commandline and values. Save the file as C:\srcds\srcds.bat in notepad (NOT .txt) and next time click the srcds.bat file. If you need to close srcds, close the hlds window and press Y (depending on language) at the Terminate batch question. Please do note this does not work with crashes/errors that involve a Windows error box.
Taken from here.

Anonymous

Quote from: Whitey;182261Would it be possible to start our Source servers using the following method, at least then the rcon admins could restart the server when it has issues without the need to bother OB/BB/TL:

Taken from here.


I can try it but the command line we use to start our servers are about 3 miles long :)

Anonymous

#2
Thanks for the script Whitey. With a little bit of tweaking and testing it is running so all 3 CS:S servers are now protected by auto restart scripts. If you are doing this for your own server and forget to change the "start /normal" entry to "start /wait" (like I did) then like me you will shortly have several hundred instances of CSS running on a server - try it you'll have a ball :blush:

If you are getting lag on the server, or need to restart for any other reason, do the following:
  • Warn everyone on the server that you are going to carry out a server restart
  • In game console type "rcon quit" or in HLSW console just type "quit"
The server will shutdown, you will all be disconnected but the server will restart immediately.  You can then reconnect.

NB
You MUST do a map change immediately after the server restarts so that all the variables (such as turning off dynamic pricing, enabling SourceTV, setting Mani Adverts etc.) are initialised properly. There are 3 ways to change map:
  • Using RCON you can type "rcon changelevel de_train" if you are currently on train
  • In HLSW console type "changelevel "
  • or the easiest thing to do is to restart the current map using the HLSW "Change Level" window - click the update button, select the map from the list and click "Change Level"

Dr Sadako

Quote from: BlueBall;182455Thanks for the script Whitey. With a little bit of tweaking and testing it is running so all 3 CS:S servers are now protected by auto restart scripts. If you are doing this for your own server and forget to change the "start /normal" entry to "start /wait" (like I did) then like me you will shortly have several hundred instances of CSS running on a server - try it you'll have a ball :blush:
 
If you are getting lag on the server, or need to restart for any other reason, do the following:
  • Warn everyone on the server that you are going to carry out a server restart
  • In game console type "rcon quit" or in HLSW console just type "quit"
The server will shutdown, you will all be disconnected but the server will restart immediately. You can then reconnect.
 
NB
You MUST do a map change immediately after the server restarts so that all the variables (such as turning off dynamic pricing, enabling SourceTV, setting Mani Adverts etc.) are initialised properly. There are 3 ways to change map:
  • Using RCON you can type "rcon changelevel de_train" if you are currently on train
  • In HLSW console type "changelevel "
  • or the easiest thing to do is to restart the current map using the HLSW "Change Level" window - click the update button, select the map from the list and click "Change Level"

Who can/are allowed to do this? Good work btw BB and Whitey.
-=[dMw]=-Dr "Doc" Sadako

"Gravitation is not responsible for people falling in love." Albert Einstein

KKND

Think you need this only too do when it's very Important.

Anonymous

I guess it will just be those admins with RCON access as there is not a mani command (IIRC) - you should only use it on the occasions that you would normally go find an admin to get a server restarted if it was laggy - I can't think of any other point at which you would need to.

Whitey

:yahoo:thanks BB.
It will make life a lot easier when we have a match and realise Baldric is laggy.

KKND

Quote from: Whitey;182482:yahoo:thanks BB.
It will make life a lot easier when we have a match and realise Baldric is laggy.

Indeed..:)