Game Server Reporting - UT2004, QW, BF1042, BFV, COD, HL
Moderators: Developers, Moderators
Game Server Reporting - UT2004, QW, BF1042, BFV, COD, HL
For my game server hosting and community website I've assembled a group of scripts that will query specified game server and log their current player count, and max players. Since I put a lot of effort into it, I thought I'd contribute back. Enjoy!
Notes:
Some of these scripts require that qstat be installed. Some of the code for the Battlefield scripts was taken from the bfserverstats project over at sourceforge http://sourceforge.net/projects/bfserverstats.
Notes:
Some of these scripts require that qstat be installed. Some of the code for the Battlefield scripts was taken from the bfserverstats project over at sourceforge http://sourceforge.net/projects/bfserverstats.
- Attachments
-
- Showing multiple servers worth of info at once. purdy, purdy...
- game_servers_graph.png (13.76 KiB) Viewed 54172 times
-
- A graph of a single server.
- game_server_graph.png (7.02 KiB) Viewed 54172 times
-
- game_server_scripts_and_xml.zip
- The scripts and XML config.
- (17.53 KiB) Downloaded 3881 times
This is awesome! I was actually looking at getting something similar going. The only problam I seem to have is that the game server I'm trying to graph doesn't seem to have a way to poll via networking. (It's Delta Force 1) I need to run an application that grabs values from memory while the application is running.
I was going to modify BAB.stats to see if I could get it's information into Cacti...
Anyone else done anything similar? Once I get it done, I will post it here.
I was going to modify BAB.stats to see if I could get it's information into Cacti...
Anyone else done anything similar? Once I get it done, I will post it here.
uname -a
Something like this should work:
Make sure that you have execute file permissions on the file. Then make sure that that qstat command line works.
Code: Select all
#!/usr/bin/perl
my $address = shift;
$response = `qstat -raw __ -sms $address`;
@response = split('__',$response);
print "player_count:".$response[5]." ";
print "max_players:".$response[4]." ";
This is a great addon
I'm using it without a problem for my Call of Duty server,
but Battlefield Vietnam is giving a problem.
the maximum players surrent: keeps saying 'nan' :S
The other values are all saying '0' and when i join the server it goes to '1'.
any idea what might be the problem? and maybe how to fix it
I'm using it without a problem for my Call of Duty server,
but Battlefield Vietnam is giving a problem.
the maximum players surrent: keeps saying 'nan' :S
The other values are all saying '0' and when i join the server it goes to '1'.
any idea what might be the problem? and maybe how to fix it
It is because PHP is outputting a "Powered-By-PHP" header in the script output which would interfer with the first data value i.e. Max_players.InfInIte wrote:This is a great addon
I'm using it without a problem for my Call of Duty server,
but Battlefield Vietnam is giving a problem.
the maximum players surrent: keeps saying 'nan' :S
The other values are all saying '0' and when i join the server it goes to '1'.
any idea what might be the problem? and maybe how to fix it
To fix you should modify the data input Method from
Code: Select all
php <path_cacti>/scripts/bfv_query.php <address>
Code: Select all
php -q <path_cacti>/scripts/bfv_query.php <address>
ok I think I found the problem
when I rum cmd.php for the command line the script works
when I rum cmd.php for the command line the script works
but when cron runs the command the games scripts dont workupdate /home/chicago/public_html/cacti/rra/eagle7_max_players_129.rrd --template player_count:max_players N:0:24
whgat could be wrong ?update /home/chicago/public_html/cacti/rra/eagle7_max_players_129.rrd --template player_count:max_players N::
Who is online
Users browsing this forum: No registered users and 0 guests