Jump to content

Home

Streaming log files???


DeathsHead

Recommended Posts

The solution is simple. You must write a program that scans the log file, stores the data to a database or another server, then clears the log file.

 

Clearing the log file will ensure that the log file remains very small to offload processer time and not effect the performance of the server(s).

Link to comment
Share on other sites

To have a constantly updated jk2 stats. I use this kind of system right now with CS and psychostats. I have a dedicated stats server that updates and web hosts the stats on a 30 min cycle with CS. I could use jk2parser and set it to autorun every half hour or so with jk2 stats and do the same thing.

 

Ok so since I can't do that, is there a way for me to upload a .log file while the server has it in use? Like copy a file while it is being written to??? What I want to do is have the server auto-upload the log file every x amount of minutes to my webserver through an ftp .bat file

 

My server and info is here: http://www.ClanAYBABTU.com to see what I am doing right now with the psychostats, just click on psychostats under cs

Link to comment
Share on other sites

You could have a cron job move the logfile to a temp at some regular interval, that would automagically begin the generation of a new one.

 

You'd likely want to code your script in such a way that it reads backwards from EOF until it has the end of a game and chops off the extra. That extra would then be prepended to the in-progress log on the next run. In theory that would make sure that you had a parse of every full game since the last run without losing stats between file breaks.

 

-h

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...