![]() |
Logfile options |
One logfile |
Usually, httpd server are logging requests in one log file.
On NCSA or Apache 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 With traffic increase, most provider now support compressed logfile to save disk space. Some use daily compressed logile, others use monthly compressed logfiles. W3Perl is able to cope with both of them. |
Several logfiles |
Introduced in v2.30, current version can cope with various filename string.
Select in the configuration file the filename log format you are using. Log filename string can be whatever you want :
Example of supported string filename :
|
Daily gzip files |
A number of ISP are providing logfile in a daily compressed format. Use $zip = 1 and $zipcut = 2 in the configuration file to select the use of daily compressed logfiles.
|
Day to day logfiles |
The package require that the logfile have more than one day's data. But if your site is pretty busy and you decide to clear the log files each day, it's still possible to use w3perl. You'll need to move your logfile at midnight to another filename, w3perl will update stats by reading the moved logfile. Follow the next instructions.
log file log_current is running from 00 h to 23 h 59
Day 2
Day 3
Day 4 You will have incremental stats with only a one day logfile. Of course, choose carefully the options in your config file as logfile are destroyed so stats can't be compute back.
|
Monthly gzip files |
Log files are growing very fast (especially for NCSA log file
which can't disable local requests logging). In the config.pl file, you have to
edit : $zip = 1 and $zipcut = 1 to select the use of monthly compressed logfiles.
|
Do it yourself |
W3Perl have been using monthly compressed logfile for many years. If you want to
cut your logfile each month and use the compressed log file mode, follow the next
lines :
To alter your old log files in the new format, use :
It will save you a lots of space disks as log file are growing very fast ! NT users can use zip instead of gzip. It will give you for example access_log.01-1995.zip intead of access_log.01-1995.gz.
Use squeezelog to cut and compress your logfile each month :
I'm using a small script squeezelog to
cut and compress the log file each month.
Compression rate is around 90% of the initial file saving a
lots of disk space. You need to edit squeezelog 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 : (if the logs files are root, you should ask your administration system to install squeezelog).
|
![]() |