Find the answer to your Linux question:
Results 1 to 2 of 2
hi I have squid version 2.6.STABLE5 installed on etch stable. I'd like to eradicate squid log files using cron and logrotate according to: http://tldp.org/HOWTO/Bandwidth-Limiting-HOWTO/faq.html but howto change this cron entry: ...
  1. #1
    cc
    cc is offline
    Linux Newbie
    Join Date
    Jun 2004
    Posts
    120

    eradicate squid log files using cron and logrotate

    hi

    I have squid version 2.6.STABLE5 installed on etch stable.
    I'd like to eradicate squid log files using cron and logrotate according to:

    http://tldp.org/HOWTO/Bandwidth-Limiting-HOWTO/faq.html

    but howto change this cron entry:
    Code:
    #SQUID - logrotate
    01 4 * * * root /opt/squid/bin/squid -k rotate; /usr/sbin/logrotate /etc/logrotate.conf; /bin/rm -f /var/log/squid/*.log.0
    for debian etch stable ?

    perhaps ?
    Code:
    #SQUID - logrotate
    01 4 * * * root /usr/sbin/squid -k rotate; /usr/sbin/logrotate /etc/logrotate.conf; /bin/rm -f /var/log/squid/*.log.0
    my /etc/logrotate.d/squid looks like:
    Code:
    /var/log/squid/access.log {
      daily
      rotate 4
      copytruncate
      compress
      notifempty
      missingok
    }
    
    /var/log/squid/cache.log {
      daily
      rotate 4
      copytruncate
      compress
      notifempty
      missingok
    }
    
    /var/log/squid/store.log {
      daily
      rotate 4
      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
    }
    should I remove these all entries and change to:
    Code:
    #SQUID logrotate - will keep logs for 40 days
    /var/log/squid/*.log.0 {
    rotate 40
    compress
    daily
    postrotate
    /usr/bin/killall -HUP syslogd
    endscript
    }

  2. #2
    Just Joined!
    Join Date
    May 2009
    Location
    Kenya
    Posts
    1

    Squid logrotate

    Did you get the answer,
    I need to rotate on hourly basis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •