|
|
| |
| Introduction
| |
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
A sample configuration file has been placed in /usr/local/etc/savelogs.conf.sample. If you wish to use the configuration
file, we recommend that you rename this file to /usr/local/etc/savelogs.conf before using it (so that if you ever upgrade
savelogs you won't lose your configuration file).
| |
| Documentation
| |
See the savelogs Man Page:
# man savelogs
Also check out the rotation Man page:
# man rotation
|
Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2016 GSP Services, Inc.
|