I'm getting started with BYOND game hosting on Linux, and I'm trying to put together a suite of tools for myself and my other server administrators to use to be able to effectively monitor and, well, help run the server.
In particular, I am looking for a way to get server information directly from my server itself. If I have DreamDaemon running my chosen .dmb file on, say, port 12345, I'm looking for a protocol spec that I can use to connect to the server on that port to get information like number of players connected, and the like.
I would be baffled to hear there is not a way do do this, but searches on these fora leave me coming up dry. A little help?
#2 May 18 2012, 9:05 pm
|
|
If you have access to the game itself, probably the easiest thing would be to create a little library that output the server stats to a file. If you want a tool that will work for any game without outside intervention, I'm afraid there's nothing at the moment (if the game has a hub you could always poll the hub page, but that's a bit hacky). We could add something though.
| |
Tom wrote:
If you have access to the game itself, probably the easiest thing would be to create a little library that output the server stats to a file. If you want a tool that will work for any game without outside intervention, I'm afraid there's nothing at the moment (if the game has a hub you could always poll the hub page, but that's a bit hacky). We could add something though. IMO we already have everything we need in the system it's just choosing the right way to utilize it. Unless you don't own the game or the code.. | |
#4 May 18 2012, 11:13 pm
|
|
I have the source code, and it's on my server, certainly. I suppose I could just drop files for my own other tools to parse, but it seems surprising that there's no built-in mechanism to get things like the number of players connected; possibly their names, and the like.
I do agree that (had I a hub) I could poll the hub page, but that wouldn't be real-time, and adds burdens that a poke on localhost wouldn't. If you'd be willing to add some TCP/IP interface I could hook into, that would be immensely helpful, Tom. In the meantime, I'll look into dropping status files. | |
#5 May 18 2012, 11:23 pm
|
|
I would look into a local DMCGI site on the same server tbh you could give it a much easier look at feel.
You can also do this with PHP there is a example somewhere on the forums. | |
#6 May 18 2012, 11:43 pm
|
|
One thing I just remembered is that you can use world.Export/Topic to send the special "ping" message from one server to another to get the player count (you could do more generalized Topic() calls to get more info). So what you could do is write a simple.dmb that does an world.Export("ping") (or more general) to get the info you want, outputs to the screen, and exits. Wrap that in a shell script that calls DreamDaemon and you've got your tool.
| |
BUT you can set up a DMCGI webpage and some Topics on the game (if you have the source) to report back to the DMCGI page.