[NTLUG:Discuss] Logrotate
    Rick Matthews 
    RedHat.Linux at verizon.net
       
    Sat Aug  3 20:24:52 CDT 2002
    
    
  
> Does anyone know how to change the frequency of the logrotate
> procedure for the squid access.log?  
Hmmm, there *used* to be a guy around here that knew how to do that...
What was his name.........
You can start with 'man logrotate'.
Then see if you have a /etc/logrotate.d/ directory. If so, you should
find a <squid> file in that directory. 'man logrotate' will explain the
contents of the file.
It should look something like this:
---------------- squid logrotate script ---------------
/var/log/squid/access.log {
    weekly
    rotate 3
    copytruncate
    compress
    notifempty
    missingok
}
/var/log/squid/cache.log {
    weekly
    rotate 3
    copytruncate
    compress
    notifempty
    missingok
}
/var/log/squid/store.log {
    weekly
    rotate 3
    copytruncate
    compress
    notifempty
    missingok
# This script asks squid to rotate its logs on its own.
# Restarting squid is a long process and it is not worth
# doing it just to rotate logs
    postrotate
      /usr/sbin/squid -k rotate
    endscript
}
-------------- end of script ------------------
Hope that helps!
Rick
    
    
More information about the Discuss
mailing list