RE: [hlds_linux] Logfile Management and Stats
I have a cron job that runs daily and deletes logfiles older than x days. I'm not a commercial game server, so logs are not that critical to me. 2 weeks is plenty. Mike > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Christoph Franke > Sent: Monday, August 02, 2004 11:09 AM > To: [EMAIL PROTECTED] > Subject: [hlds_linux] Logfile Management and Stats > > -- > Hello folks, > > according to the guidelines for the installation of > Psychostats my hlds runs with the following log options: > > log on > mp_logmessages 1 > mp_logdetail 0 > > As logfiles tend to get huge on well attended servers I would > like to know what kind of logfile management is used out > there. Do you rotate logs with logrotate (and if you do: > which options do you use)? How long do you keep logfiles? And > to the users of Psychostats: which time period do you cover > for statistical reasons, and is Psychostats capable of an > analysis of compressed files (e.g. old log compressed by logrotate). > > Thanks in advance and regards > > Christoph > > -- > | GnuPG Public Key: http://www.thefranke.net/public.asc | The BOFH > | Archive at: http://bofh.ntk.net/Bastard.html | Registered > Linux User: > | 250439 - http://counter.li.org | > -- > [ Content of type application/pgp-signature deleted ] > -- > > ___ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux
Re: [hlds_linux] logfile management
they should compress much better than that. I compress about 80mb of logs into <10mb. "Chuck Larson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > A months logs uncompressed are about 120 MB and compressed about 45 MB > > > Chuck Larson > mailto:[EMAIL PROTECTED] > http://www.tombstone-gaming.com > > > Quoting "Brian A. Stumm" <[EMAIL PROTECTED]>: > > > > > Couple questions for you... > > > > How big (file size) is one months worth of log files? > > > > How big is one maps regular *.log file for you and how long maps do > > you > > run or how much disk space does one days worth of log files take up > > for > > you (uncompressed). Trying to get an idea of how big one months logs > > would > > be compressed for *my* situation... > > > > Thanks. > > > > > > On Wed, 5 Jun 2002, Chuck Larson wrote: > > > > > I wrote one that I use with cron that tars and gzips last months > > logs > > > into a seperate directory then deletes last months logs. > > > > > > I do this on the 15 of every month since I rarely have to go back > > more > > > than 2 weeks. > > > > > > You could modify this to suit your needs I'm sure > > > > > > > > > # - Start of script > > > > > > #!/bin/bash > > > # > > > # Archives last months hlds_linux logs > > > # > > > > > > MONTH=`date '+%m' --date='1 month ago'` > > > YEAR=`date '+%Y' --date='1 month ago'` > > > > > > # Location of HLDS log directory > > > LOGSDIR='/usr/games/hlife/hlds_l/cstrike/logs' > > > > > > # Location to place tarball > > > ARCHIVE='/usr/games/hlife/logArchives' > > > > > > if [ $YEAR ] > > > then > > > if [ $MONTH ] > > > then > > > cd $LOGSDIR > > > echo Archiving last months logs > > > if [ -e `tar -zcf > > $ARCHIVE/logs_$YEAR-$MONTH.tar.gz > > > L$MONTH*` ] > > > then > > > echo Removing last months logs > > > rm -rf L$MONTH* > > > else > > > echo Error Archiving logs > > > fi > > > else > > > echo Error determing last month value > > > fi > > > else > > >echo Error determining last month and year values > > > fi > > > > > > # --- END SCRIPT > > > Chuck Larson > > > mailto:[EMAIL PROTECTED] > > > http://www.tombstone-gaming.com > > > > > > > > > Quoting "Brian A. Stumm" <[EMAIL PROTECTED]>: > > > > > > > Has anyone written or found a shell script or the like used to > > > > automatically delete log files that are a certain number of days > > old? > > > > I'd > > > > like to keep a solid months worth of log files (31 maybe 35 days > > or > > > > so). > > > > I'm imagining a shell script that is croned to run once a day > > > > deleting > > > > files older than a certain age. I'm sure I could figure something > > out > > > > but > > > > thought I'd ask if anyone else is doing something similar. > > > > > > > > -- > > > > > > > > > - > > > This mail sent through IMP: http://horde.org/imp/ > > > ___ > > > To unsubscribe, edit your list preferences, or view the list > > archives, please visit: > > > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > > > > > > -- > >ab. > > Brian A. Stummd88b. > > [EMAIL PROTECTED] 8P"YP"Y88 > > http://www.bs-linux.com 8|o||o|88 > > The Choice of a Gnu Generation8'.88 > > 8`._.' Y8. > > # d/ `8b. > > ### .dP . Y8b. > > ## # d8:' " > > `::88b. > > ## ### ### ### ### ### ### ### d8" > > `Y88b > > ## # ## ### ## #### ## ## :8P ' > > :888 > > ## # ## #### #### ### 8a.: > > _a88P > > ##### #### #### ###._/"Yaa_ :.| > > 88P| > > ## # ####### ###### ## \YP" `| 8P > > `. > > #### ### # #### ### ### ## ## / \._.d| > > .' > > # ### ### ### ### ### `--..__)88P`._.' > > > > > > ___ > > To unsubscribe, edit your list preferences, or view the list > > archives, please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > > > > - > This mail sent through IMP: http://horde.org/imp/ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux
Re: [hlds_linux] logfile management
Don't run this command as root from the root directory :) Very bad things will happen to you if you do. On Thu, 2002-06-06 at 08:18, Casper Gielen wrote: > On Wed, Jun 05, 2002 at 09:12:16PM -0700, Brian A. Stumm wrote: > > Has anyone written or found a shell script or the like used to > > automatically delete log files that are a certain number of days old? I'd > > like to keep a solid months worth of log files (31 maybe 35 days or so). > > From the top of my head (=untested) > > find ./ -mtime +30 -exec rm {} \; > > (Find all files in the current directory modified for the last time over > 30 days ago and remove them) > > If it works as expected put it in crontab. > -- > Casper Gielen > [EMAIL PROTECTED], [EMAIL PROTECTED] > -- > Linux sucks twice as fast and 10 times more reliably, > and since you have the source, it's your fault. -Ca1v1n > ___ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux > ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux
Re: [hlds_linux] logfile management
> Has anyone written or found a shell script or the like used to > automatically delete log files that are a certain number of days old? I'd > like to keep a solid months worth of log files (31 maybe 35 days or so). > I'm imagining a shell script that is croned to run once a day deleting > files older than a certain age. I'm sure I could figure something out but > thought I'd ask if anyone else is doing something similar. C'mon Brian! It's Linux... find /usr/hlds_l/tfc/logs -name "*.log" -ctime +30 -exec rm -f {} \; Stick that in your cron and run it once a day. Jeffrey "botman" Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux
Re: [hlds_linux] logfile management
"Brian A. Stumm" wrote: > > Has anyone written or found a shell script or the like used to > automatically delete log files that are a certain number of days old? man find man crontab Florian. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux