>    3. Re: Specifying Log file size in 1.6 (m0gely)
>    4. Re: Specifying Log file size in 1.6 (kama)
> Send the server a 'log off' then tar.gz the log file, then send 'log on'
> again.  You could do that on a monthly basis and make a script easily
> enough to automate it.
>
> Actually he just need todo a 'log on' and it will rotate the file.
>
> I have written a script that gzip all the files each month and then save
> last month in its own directory to keep the file list short. And there is
> no need to use tar if its only one file. 'gzip <filename>' will pack the
> file and delete the unpacked file.
>
> basically the script for packing files is:
>
> --
> cd /where/you/have/your/logfiledir/
>
> files=`ls *.log | sort`
> count=`echo $files | awk '{ print NF }'`
> # save 2 files
> no=2
>
> for i in $files
> do
>  if [ -f $i -a $no -lt $count ]
>  then
>   gzip $i
>  fi
>  no=`echo $no | awk '{ a=$1; a++; print a }'`
> done
> --


Thanks for the code and how to archive my logs, but the problem is that with
a one map server the log file grows to 4-5MB per day, and over the course of
a few days the server starts to lag, all I want it to to is create a new log
file every 1-2 MB, is there a setting to do this?

I appreciate the log script tho, I archive my logs every 3 months (to help
with the stats record keeping) so this WILL come in handy ;)

-Llama


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to