+ Post New Thread
Results 1 to 3 of 3
*nix Thread, Would like Squid Daily Logs to be pruned in Technical; Apoloiges I should have put this on my previous post which is to do with Squid. This question isn't really ...
  1. #1
    ranj's Avatar
    Join Date
    Feb 2006
    Location
    Birmingham
    Posts
    730
    Thank Post
    98
    Thanked 42 Times in 32 Posts
    Rep Power
    25

    Would like Squid Daily Logs to be pruned

    Apoloiges I should have put this on my previous post which is to do with Squid.

    This question isn't really a problem its more of how we could do it

    We have noticed that in var/log/squid that we have all the logs for access to the internet by all users in school.

    This is very handy but at the moment we find it stores 7 days worth of usage in 1 log file.

    Is there a way we can create a log file for each day rather than 1 log for 7 days and also ask it to delete old log files in the process?

    Thanks

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,692
    Thank Post
    352
    Thanked 797 Times in 716 Posts
    Rep Power
    347
    I noted you mentioned Gentoo on another post so this may be relevant.

    logrotate can be used in this instance.

    Check the bottom of this link for info on how to give it a go.

    Probably not for the feint hearted unless you've got a good backup/linux techy.

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Here's my logrotate config for squid (stock Debian, but tweaked to keep 4 weeks worth).

    Code:
    #
    #       Logrotate fragment for squid.
    #
    /var/log/squid/*.log {
            daily
            compress
            delaycompress
            rotate 28
            missingok
            create 644 proxy proxy
            sharedscripts
            prerotate
                    test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
            endscript
            postrotate
                    test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
            endscript
    }

SHARE:
+ Post New Thread

Similar Threads

  1. Today's Daily Dilbert
    By Joanne in forum Jokes/Interweb Things
    Replies: 1
    Last Post: 12th February 2008, 01:49 PM
  2. How do you keep track of you daily jobs?
    By Little-Miss in forum General Chat
    Replies: 28
    Last Post: 14th October 2007, 02:15 PM
  3. Squid logs
    By srochford in forum How do you do....it?
    Replies: 12
    Last Post: 13th April 2007, 12:53 PM
  4. daily message
    By alonebfg in forum Wireless Networks
    Replies: 5
    Last Post: 23rd November 2006, 09:37 AM
  5. Daily Dilbert
    By Simcfc73 in forum General Chat
    Replies: 5
    Last Post: 3rd July 2006, 11:50 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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