Managing Web Server Log Files
In order to keep your Web Server log files from wasting your disk space, you will
occasionally need to rotate your log files. Some
Log Analyzers can do this for
you, or you can use one of the following tools.
Rotatelogs
Rotatelogs is an Apache script designed to cycle your Web server log files on a
regular basis. You can load it directly in your Apache configuration file
(/usr/local/apache/conf/httpd.conf) by modifying the TransferLog to look
similar to the following.
TransferLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/access_log 86400"
For more information about using rotatelogs, you can see the man page by running
man rotatelogs from the server command prompt.
Savelogs
savelogs is meant to be a complete
Web Server Log Rotation program.
savelogs can rename, archive, compress, and delete (or any combination of the above)
as well as provide newsyslog-type log rotation (see newsyslog(8) for details).
Options may be specified on the command-line or in a configuration file. Besides archiving
single logs, savelogs can search your Web
Server Configuration File and automatically rotate logs defined there.
Installation
To install savelogs, follow these instructions:
Connect to your server via
SSH,
su to root, and run this command:
# vinstall savelogs
(t)csh shell users may have to rehash their path before running savelogs or
viewing the man page:
# rehash
Documentation
See the savelogs Man Page:
# man savelogs
Also check out the rotation Man page:
# man rotation
savelogs Tutorials Web Site
http://perlcode.org/tutorials/savelogs/

|