Page 1 of 1
How can I collect data from the server ... ?
Posted: Mon Jun 23, 2008 3:34 am
How do I report on the status of my server, while it is running? I'd like to collect simple things, like the number of players ...
At the moment I have an admin observer permanently logged in, running under screen ... and a decent logfile from the -d option. But I don't have an automated way to collect data that I can then report with MRTG or similar.
Posted: Mon Jun 23, 2008 4:49 am
I once created a Cacti graph to track the number of players on a server... but if you're on MRTG I guess that won't help you. You would have to create some sort of script, per your statistics software's documentation, to check a server and report back the number of players. I used AAA's BZFlag_Info.php script for the interface, and made a custom script to format the output, etc.
Posted: Wed Jun 25, 2008 6:50 pm
There is a PHP script in the /misc dir of the bzflag source that prints an array of the users (and their score, team color, email, etc). I believe Blast wrote it.
Ah, the correct answer ..
Posted: Mon Jun 30, 2008 8:07 am
Thanks for the hint about the scripts in /misc of the source.
In there I can see bzfquery.pl, by our maintainer Mr Riker, showing how to connect directly to the server port and get stats out.
This script can be happily run on a scheduled basis and output into anything. Just what I needed
Also mrtg-bzfquery.pl and a few other goodies. Yum!