It would be nice if it was possible to determine, for a local headless server, whether network players are currently connected to it. While this can usually be done by querying the masterserver, that's not as ideal as being able to determine this locally. Currently, if the gameserver fails, for any reason, to report / get listed on to the masterserver, then you cannot determine its current game state (waiting for network players, game full, game in progress, # of network players connected).
Some use cases:
You may want to restart the server in regular intervals or based on system indicators but only if no network players are currently connected (you may want to postpone otherwise), if, for example:
- the process has been running for > 24 hours, but you want to restart it every 24 hours to rotate the log files
- the process' memory consumption has reached xxx MB but no network players are connected,
So it would be nice to be able to do one of the following:
- Inspect presence of a lock file which indicates that >=1 network players are connected
- Run megaglest with a special command line option to determine the game state of the previously started (and still running) MegaGlest process
- There may be other ways/interfaces I cannot currently think of which would serve this purpose even better
I guess I'm asking for two things: an indicator which allows to determine whether network players are connected (this would be really nice to have from a server admin point of view - sure you can use netstat/lsof for this purpose but it's not as clean) and a way to locally query the current game state of a running headless server. The latter is actually not so important to me, I'm merely listing it here because it is somehow related and might be of use to others (and would include the first request).