LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-21-2007, 07:25 AM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 51
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
}

Last edited by cccc; 08-21-2007 at 07:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
where does cron keep it's activity log files? mschrank99 Linux - Software 4 10-24-2006 07:21 PM
how to logrotate auth.log files? clintcan Linux - Security 1 12-10-2005 04:55 PM
logrotate log files - keeping in order when using grep or cat and bash dmellem Linux - Software 6 02-11-2005 01:05 PM
Cron is not outputting log files... Clubber Lang Linux - Newbie 2 09-27-2004 04:41 AM
How to add my log files in logrotate Groucho Slackware 2 10-03-2003 08:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration