Server Tools
eaglec
Join Date: 2002-11-25 Member: 9948Members, Constellation
<div class="IPBDescription">How full is our server?</div> DMS has been putting in far too much time trying to figure out how to get from our log files a nice graph showing us how full the server was over a period of time. Now he's managed using Public_slots_free but that doesnt account for reserved slots, and using "entered" or "connected" and "disconnected" to parse the logs doesn't work well as it seems some conected and disconnected are logged twice!
Has anyone got such a tool already or must he continue this painful exercise.
If your wondering why you want to know it's because warservers have given us such a fabulous server we have cpu and bandwidth to spare. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
Has anyone got such a tool already or must he continue this painful exercise.
If your wondering why you want to know it's because warservers have given us such a fabulous server we have cpu and bandwidth to spare. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
Comments
Let me know,
Superfly
the stats program that I am developing has a minor thing link that, but it only works over hours at the moment. I can modify it to do days as well, but that would take me a couple of days.
<i>Pebbs</i>
Pebbles - I am very interested in Pebstats, but there seem to be no demo's available?
/edit/ I think I've just seen one - it show connections but I want to see total active players instead.
/edit/ also I have a linux box I use for my web server at the moment - so I guess we could use that.
I will let you know how I progress,
Superfly
Edit:
I just saw the rest of your post, if you have and would like to use your Linux webserver let me know. If you want it all conatined on the WinXP computer than that "should" work as well.
Thank you very much for offering to look at this for me.
Psychostats does a very simple graph of player connection attempts if that would suffice.
AMX doesn't double log, so it would work correctly.
You will need to modify two files.
GetStat.vbs <-- Chang the path to your php.exe file as well as the path to the stats.php file(wherever you will run it from).
settings.php <-- This should be obvious this file includes your MySql connection info as well as the name of the database and table you want to use.
The stats.php script takes the following command line commands.
flush <-- this will empty your table in the database.
createdb <-- if you do not have a database yet this will create a database and table from the information you specified in the settings.php file.
The proper syntax for running the php script with options is as follows:
C:\php\php.exe -q c:\Stats\Stats.php createdb <-- this will create your database.
C:\php\php.exe -q c:\Stats\Stats.php flush <-- this will flush the table data.
C:\php\php.exe -q c:\Stats\Stats.php <-- this will log one entry into your database.
This was created with PHP 4.3.1.
When you schedule this in Windows you will need to choose to run it every day and then check the advanced options to repeat it every x number of minutes. It will probably take two tasks to run 12 hours at a time for this to work 24 hours.
Note: Make sure that the database user that you specify has full (root) access to your MySql server.
<a href='http://games.gci.net/staticpages/index.php?page=20021024113239361' target='_blank'>GameTrakker</a>
yeah i was bored and wanted something interesting todo, and i'd just gotten round to the idea of using qstat & wanted to figure out how to get it to timestamp its entries, but hell i see there are plenty of people who can do it already here ;-)
I was a bit annoyed with the server logs, people connect (or "enter the game") without ever disconnecting so i was getting more players on the server than possible ;-)
It'll be interesting to see server usage though.
I thought of calculating a weighted average per hour of game time, so instead of a histogram with 2million points you have one point per hour, which is calculated on the (time*noplayers) / total time i.e. if 12 players for 30 mins and 0 players for 30 mins you get (12*30+0*30)/60 = 6.
<a href='http://www.nonoobs.com/stats/srvstats.html' target='_blank'>http://www.nonoobs.com/stats/srvstats.html</a>
<a href='http://bs-linux.com/hlds_stats/' target='_blank'>http://bs-linux.com/hlds_stats/</a>
with the help of this
<a href='http://spokaneteamfortress.com/phlgui/hlds_stats.tar.gz' target='_blank'>http://spokaneteamfortress.com/phlgui/hlds...ds_stats.tar.gz</a>
which is part of a greater package availble here (haven't tested this at all).
<a href='http://spokaneteamfortress.com/phlgui/' target='_blank'>http://spokaneteamfortress.com/phlgui/</a>
Gametrakker uses a similar technique and the predecessor software to rrdtool (mrtg) to produce the data graphs.
Thanks the script works fine and is merrily taking player counts for us. I just need to sort out some sort of report now. Shouldn't be too much of a problem.
I notice your script has none of those cumbersome comments <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--> I dont suppose they're available... I kind of follow it and I think this is the bit that grabs the player number from the server
fwrite($fp,"????players\x00");
am I on the right lines ?
you get results like <a href='http://www.planetkaos.net/servers.php' target='_blank'>http://www.planetkaos.net/servers.php</a> (for sof2.. not hl)
i could give you the script if you wants..
I like those graphs farcry - I wont say no to borowing your scripts if you don't mind!
<a href='http://ns1.muppetking.com/graphtest/' target='_blank'>http://ns1.muppetking.com/graphtest/</a>
now the links not meant to be public do i'll pull it in a few hours, but i thought anyone readint the thread my be interested.
we've used the software that some friendly chap offered eaglec and i've used a graphing package ontop of it to get something i'm very happy with indeed.
its been very instructing to "learn" mysql, php & graphing software to extent to pull this off!
//did i forget to say i'm **** after a buisness lunch, sorry for spelling - oh come on being drunk (word starting with p) isnt offensive surely!!!!