[WBEL-users] Web Log Files - HUGE

Ladar Levison Ladar.Levison@imaginesolutions.com
Mon, 7 Jun 2004 13:24:04 -0500


Jeff --

By default, logrotate should rotate the logs every week, and keep up to
four weeks worth. Perhaps you accidently stopped the cron the job from
running.

Make sure this log-rotate script is still set to run daily. Also note
that you can have logrotate compress your log files, which might be a
good idea in your case (if you don't mind the overhead).

My cron job and logrotate.conf file :

[ladar@staci cron.daily]$ cat logrotate
#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with
[$EXITVALUE]"
fi
exit 0
[ladar@staci cron.daily]$ cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.


Let me know if you have any more problems.

L~

From: "Jeff Maze" <maillists@crescentdigital.com>
To: "'Users Group'" <whitebox-users@beau.org>
Date: Mon, 7 Jun 2004 10:55:15 -0400
Subject: [WBEL-users] Web Log Files - HUGE

Hello,
	I was wondering if there was some documentation on possibly
using LogRotate to cut back on the sizes of my webserver log file..
Some of them are huge (probably the largest is a gig or two, maybe
more)..

	I would like to delete everything before Jan 2001 and will
LogRotate allow me to do this?  I point in the right direction would
greatly be appreciated..  Thanks..