Forlix.org

2017/10/20 - 23:36
54.92.141.211 - 11348v
 
Last modified 2014/05/23
 

Forlix SrcDS Manager (2011/06)

This is a Source Dedicated Server manager for Windows hosts. It monitors all configured SrcDS processes in parallel, restarts servers in case of crashes, pings the servers every few seconds to determine if they are still responsive, and keeps servers up to date. With this tool, your Windows SrcDS will be one of the first to update and come back online after a required game update.

The manager is easily installed as a Windows Service in the desired location using a single command and spawns all SrcDS processes in the background once started. A shutdown or stop signal makes the manager service kill all its servers and then end itself.
The service installed on a Windows Server 2003
The service installed on a Windows Server 2003

Automatic update support (which is broken when using the out-of-the-box Windows-SrcDS) is added and managed for all servers. A supplied Metamod:Source plugin "MRRPatch" places a marker file update_request.txt in the gamedir and shuts down the server with a configurable delay once it receives an out-of-date message (MasterRequestRestart or short MRR). Before attempting to (re-)launch a server, the manager always checks for the existence of this file and initiates the SteamCMD update procedure if required.

Installation:
Place the srcds_mgr.exe and your adapted srcds_mgr.cfg files in a folder of your choice. A recommended location is the directory where you installed SteamCMD. To install the service, open a command prompt, change to that directory and type srcds_mgr.exe -i. The service is now installed and can be launched from the Services Management Console. Uninstallation is done the same way, using the argument -u.

For automatic update support, install the MM:S plugin on all servers launched by the manager. Simply extract the ZIP file with the addons folder into your mod folder and MM:S will automatically load the plugin on the next mapchange or server restart.

It is highly recommended to disable error reporting via Control Panel > System > Advanced, and also to disable "Application Popups" by setting the Registry-Key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows\ErrorMode" to 2 (MS KB 128642). Otherwise you may experience the manager continuously trying to restart a server without success, because the crashed instance is still waiting for someone to acknowledge the popup.

Notes on manual control:
A GUI monitor application is planned (in the distant future...), from where individual servers can be stopped and restarted, or the update process triggered manually. Right now, stopping individual servers is not possible, and neither is the changing of startup parameters for individual servers without restarting the service (and thereby all servers). To manually initiate an update on one of the servers, you can issue the manual trigger command of the MM:S plugin via RCON (see below).


Detailed features:

  • Monitoring of up to 16 server processes independently in parallel
  • Server health is checked by sending A2S_INFO queries at fixed intervals
  • Server memory usage is monitored, and a server terminated if the set limit has been exceeded
  • Process priority and affinity can be set for each server individually
  • Keeps a detailed logfile regarding the restarts and updates of all servers
  • Only one server will be updated at a time using a queue system
  • SteamCMD update log is written to a seperate file
  • An unsuccessful SteamCMD run will cause the update to be repeated up to 2 times
  • Server shutdown can be postponed until player count drops to a threshold
  • Any connected players will be notified of the server shutdown and update in advance
  • A server will be installed from scratch automatically if the specified root directory does not exist

Changes in v1.03: (2011/06)

  • Initial release

Changes in v1.05: (2012/05)

  • Fixed update process timing out due to buffer overruns
  • Fixed some small memory leaks
  • Fixed output from HldsUpdateTool not being logged if a timeout occurred
  • Fixed service stop request being stalled during an update procedure
  • Monitoring now begins 5 minutes after the respective server launch

Changes in v1.10: (2013/05)

  • Migrated update procedure to SteamCMD
  • Removed Exec option, replaced UpdTool+UpdGame options by UpdPath+UpdArgs
  • Added MonitorDelay option to delay monitoring on server startup
  • Added install-from-scratch feature to ease the setting up of servers

Configuration file for SrcDS Manager (srcds_mgr.cfg):

This file is parsed once on service startup. The syntax is similar to HL config files - if a key or value contains no spaces, surrounding quotes can be omitted. Double-slash comments are supported. Detailed errors including line numbers will be printed to the logfile if the parsing was unsuccessful.

// Forlix SrcDS Manager configuration file
// List all servers and their parameters

"My First TF2 Server"
// Friendly name used to identify the server in the logfile
{
  Path "C:\Program Files (x86)\Valve SrcDS\tf1"
  // Path to the servers root directory (where srcds.exe resides)
  GameDir tf
  // Name of the mod folder (cstrike, tf, ...)

  Host 1.2.3.4
  Port 27015
  // Server IP (or DNS name) and port

  MaxPlayers 24
  MapName cp_dustbowl
  // Max players and initial map to be loaded

  MiscArgs "-nohltv +log 1"
  // List any other start parameters for srcds.exe

  Priority High
  // Process priority (strings as listed in Windows Task Manager)
  Affinity 0xFFFFFFFF
  // Affinity bitmask (0xFFFFFFFF: All CPU's, 0x05: CPU0+CPU2)

  MaxMemory 512
  // Memory limit (Paged+Nonpaged) in megabytes
  // Recommended minimum values: CS:S: 150, TF2: 500
  MonitorDelay 120
  // Delay monitoring for this many seconds on server startup

  UpdPath "..\"
  // Path to SteamCMD folder (relative to "Path")
  UpdArgs "232250 validate"
  // List any arguments for SteamCMD's "app_update" command
}


Configuration ConVars for the MRRPatch plugin:

forlix_mrrpatch_triggerdelay (default 20)
- Sets the time in seconds between receiving an MRR and trying a server shutdown

forlix_mrrpatch_maxplayers (default 8)
- Server shutdown will be postponed until player count has dropped to this threshold

forlix_mrrpatch_version
- Version tracking (don't modify this) - Servers running this plugin (GameTracker.com)

ConCommands:

forlix_mrrpatch_manualtrigger
- Initiates the shutdown sequence as if an MRR has been received


Changes in v1.0: (2011/06)

  • Initial release

Changes in v1.02: (2013/07)

  • Updated MasterRequestRestart signature and memory patch
  • Added UserMessage index lookup for SayText

Changes in v1.03: (2014/05)

  • Updated MasterRequestRestart signature

Sample logfile showing server updates and crashes
Sample logfile showing server updates and crashes
Download:

Forlix SrcDS Manager v1.10
(MRRPatch v1.03)
License: GPL

Service tested on Windows Server 2003 only.
MM:S plugin runs on all Orange box games.

srcds_manager.zip (Windows® executable)
srcds_mrrpatch.zip (MM:S plugin) New!

Source code
srcds_manager_src.zip (MSVC6 project)
srcds_mrrpatch_src.zip (MSVC9 project)

© 2006-2014 Forlix.org | Terms of use | Contact

Powered by Apache 2.2

Powered by Perl        Valid XHTML 1.1