How can I collect data from the server ... ?

Need help seting up a server, or have a question on how to run one? This is the place.
Post Reply
User avatar
Yojimbo
Private First Class
Private First Class
Posts: 22
Joined: Mon Jan 24, 2005 4:46 am
Location: NZ

How can I collect data from the server ... ?

Post by Yojimbo » 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.
Yojimbo Sanjuro -- bodyguard for hire. Ronin admin, still missing Hepcat and Silvercat ...

User avatar
macsforme
General
General
Posts: 2033
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » 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.

User avatar
tw1sted
Private First Class
Private First Class
Posts: 849
Joined: Tue Feb 21, 2006 10:21 pm

Post by tw1sted » 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.

User avatar
Yojimbo
Private First Class
Private First Class
Posts: 22
Joined: Mon Jan 24, 2005 4:46 am
Location: NZ

Ah, the correct answer ..

Post by Yojimbo » 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!
Yojimbo Sanjuro -- bodyguard for hire. Ronin admin, still missing Hepcat and Silvercat ...

Post Reply