One or several logfiles option
Usually, httpd server are logging requests in one log file.
On NCSA server, log name is access_log
On CERN server, log name is httpd-log
In the config.pl file, you have to edit : $zip = 0
For CERN users, your server can produce a different logfile everyday by adding the current date at the end
of the log filename. There is a patch which cured this bug (see www.w3.org).
If you don't want to install the patch, make a link each day to a fixed log filename (httpd-log for
example !) via a crontab.
Log files are growing very fast (especially for NCSA log file
which can't disable local requests logging)
I'm using a small script newhttpdlog to
cut and compress the log file each month.
Compression rate is around 10% of the initial file saving a
lots of disk space. W3Perl can cope with these compressed log
files.
W3Perl will also run faster as it will have only to scan the
current month logfile.
In the config.pl file, you have to edit : $zip = 1
- Installing multiple log files
You need to edit newhttpdlog file and configure it with your own
system. The prog should be added in your crontab and
executed once every first day of each month.
Example :
01 00 1 * * /usr/local/bin/perl /norfolk/www-data/w3perl/newhttpdlog
(if the logs files are root, you should ask your administration system
to install newhttpdlog).
- To alter your old log files in the new format, use :
- grep "/<month>/<year>" <logfile> > <logfile>.<monthdigits>-<year>
where month is only 3 letters long (first letter is upper),
year 4 digits long
and monthdigits is the month number in two digits format.
(eg : grep "/Dec/1994" access_log > access_log.12-1994)
- gzip <logfile>.<monthdigits>-<year>
(eg : gzip access_log.12-1995)
At the end, you should have in your log directory, files like for example :
access_log.10-1994.gz
access_log.11-1994.gz
access_log.12-1994.gz
access_log.01-1995.gz
The gziped files should be in the same directory as the current logging
file.
It will save you a lots of space disks as log file are growing very fast !