Question : Logfile Problem

Hi,

I run a games server on mandrake linux (mohaa) and it generates a log file which is written to /root/.mohaa/main/qconsole.log.

at 5am, I run a stats program that parses the log file and generates html output files that are published on the web.

Currently, the only way to reset that log after it has been parsed is to shutdown the games server and start it again, as this clears the log file. If I delete the logfile while the game server is running, it stops appending to the log file. if I run the following command:

echo "" > /root/.mohaa/main/qconsole.log

the file size remains the same, but the text is unreadable apart from the stuff that is appended to it afterwards.

My question is, how can I clear this logfile without restarting the server and without stopping the game server appending to it?

Many Thanks

Answer : Logfile Problem

if you're trying to get daily log files, you might be able to use a program such as cronolog (http://cronolog.org/).  if your server supports logging to a named pipe, you can get a directory full of qconsoleYYYYMMDD.log files.
Random Solutions  
 
programming4us programming4us