Squeezing the log file

The aim of squeezelog is to squeeze huge httpd log file to save disk space.
Every first day of each month , squeezelog should be called in a crontab to cut and compressed the current log file. It can be only used by root as logfiles are usually root files.

(Eg : 01 00 1 * * /usr/bin/sh /norfolk/www/w3perl/squeezelog)

Configuring squeezelog :

  • LOGDIR is the full path where the log file are stored
  • LOG is the name of your log file
  • You should give the full path for gzip (Eg : /opt/bin/gzip)
Altering squeezelog :
  • If you have a error log file, you can also compress it (delete the rem in the squeezelog file)
  • You may also want to restart the httpd daemon
    (see the last line in rem, '/home/local/WWW/server_root/httpd-pid' is the file where is located the httpd pid)