Server polling

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
joshtrav
A semi-regular
A semi-regular
Posts: 20
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Sep 03, 2009 12:47 am

Server polling

Post by joshtrav »

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
User avatar
Edge100x
Founder
Founder
Posts: 13127
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Server polling

Post by Edge100x »

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.
Post Reply