Rotating ET log files


(bman) #1

Greetings,

We’re running ET on Win2k. Any ideas how to rotate the log file? Im going to use SyStats on the log file… however when I try to open it or ftp it to the stats server, obviously the file is locked by the running ET process. I would hope there is a way to rotate them regardless as its over 400meg in size now.

bman

irc.progameplayer.com
#enemyterritory


(Rippin Kitten) #2

I’m pretty sure you’re going to have to kill the server process before you can work with the log file. You can schedule a downtime during non-peak hours, like 6 in the morning, to either offload the log files or compile them locally.

Once the server is down there’s no reason you can’t move the log file to another location since ET will start making a new one when it restarts. You could, if you so desired, keep a backlog of daily files and store them for stat evaluation.

RK


(bman) #3

heh… well I’d love to do that but its a 32 player server that is literally always full. I really dont want to kill the process just to work with the log file. Seems that there should be some way to rotate them… they get big quickly.

bman
irc.progameplayer.com
#enemyterritory


(DG) #4

does it have to be the console log or any server log?

if any, you can probably add commands into map rotate to make it create new logfile after each map or whatever maps… I’d really have thought there would be an “easier” way though - just a suggestion, untested etc etc

set d1 “shuffle_teams; vstr log1; campaign cmpgn_northafrica; set nextcampaign vstr d2”
set d2 “shuffle_teams; vstr log2; campaign cmpgn_centraleurope; set nextcampaign vstr d3”
set d3 “shuffle_teams; vstr log3; campaign cmpgn_northafrica; set nextcampaign vstr d4”
set d4 “shuffle_teams; vstr log4; campaign cmpgn_centraleurope; set nextcampaign vstr d1”

set log1 “set g_logfile 0; set g_log servername_1.log; set g_logfile 2”
set log2 “set g_logfile 0; set g_log servername_2.log; set g_logfile 2”
set log3 “set g_logfile 0; set g_log servername_3.log; set g_logfile 2”
set log4 “set g_logfile 0; set g_log servername_4.log; set g_logfile 2”

set d_initial “set g_gametype 4 ; map oasis ; set nextcampaign vstr d2”
vstr d_initial


(bman) #5

Ok… now we’re getting somewhere. Here is my 6-map config that we run:

set d1 “campaign cmpgn_sixmaps ; set nextcampaign vstr d1”

// server doesn’t recognise the campaign command when the gamecode isn’t running yet.
set d_initial “set g_gametype 4 ; map oasis ; set nextcampaign vstr d1”
vstr d_initial

(1) How would I set it up using your method above to rotate the et.log (serverlog) file after each 6 map campaign?

(2) Anyway to get it to date them? like 0618036map.log?

(3) Is it going to overwrite each 6-map log?

God they need some docs on this stuff :confused:

bman
irc.progameplayer.com
#enemyterritory #pgp
et.progameplayer.com
32 player public 6-map campaign


(DG) #6

er tbh i’m still thinking this isnt going to work - partly because the map rotation lines seem to be a bit er weird compared to rtcw, and partly because the logfile also seems to be a bit odd. I’ve set g_logfile 0 and it still makes a logfile, and always continues it :frowning: Aslong as you have a test server available or dont mind resetting and possibly server being a bit fubar, its probs worth the cut and paste into cfg to give it a try though:

set log1 “set g_logfile 0; set g_log servername_1.log; set g_logfile 2”
set log2 “set g_logfile 0; set g_log servername_2.log; set g_logfile 2”
set log3 “set g_logfile 0; set g_log servername_3.log; set g_logfile 2”
set log4 “set g_logfile 0; set g_log servername_4.log; set g_logfile 2”

set d1 “campaign cmpgn_sixmaps ; vstr log1 ; set nextcampaign vstr d2”
set d2 “campaign cmpgn_sixmaps ; vstr log2 ; set nextcampaign vstr d3”
set d3 “campaign cmpgn_sixmaps ; vstr log3 ; set nextcampaign vstr d4”
set d4 “campaign cmpgn_sixmaps ; vstr log4 ; set nextcampaign vstr d1”

set d_initial “set g_gametype 4 ; map oasis ; set nextcampaign vstr d1”
vstr d_initial

that would give you 4 campaign’s logs before it started overwriting them again. A possible alternative is a server logfile analizer that works in something like realitime, running directly off the game server… Not much idea bout this tbh but I’ve seen them done for rtcw (updated every 15 mins or whatever) so should be possible?