Every so often we have a server hang for whatever reason.
In the past we always relied on the polling service NFO offers to hosted gameservers. We were brainstorming about writing something in python to query the servers and grab their process ids with WMI, but I was curious if you had any other suggestions or possible insight you could lend into the way you go about it.
Other than registering it as a service as this still seems to not detect hangs as SRCDS reports the same cpu and ram usage during a hang even if it is for all intensive purposes dead to the world.
-Josh
Server polling
-
- A semi-regular
- Posts: 20
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Sep 03, 2009 12:47 am
Re: Server polling
Running a local monitoring script that queries and restarts as needed, as you suggested, would probably be the easiest way to go. If you wanted to get one up with as little effort as possible, you could just write maybe a 10-line wrapper that uses a 3rd-party querying engine like qstat, and then kills the task with "taskkill /im" if the query fails. If following this method, you should rename or link the srcds.exe file to a different name for each server, so that they are easy to pick out.