LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-26-2014, 04:32 PM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Rep: Reputation: 51
Rotating Squid Logs


Hi

I have Squid Cache: Version 3.1.20 installed on Debian and I'm using Sarg to generate Proxy HTML reports.
My questions is, do I lost squid logfiles from last 14 days using:
Code:
logfile_rotate = 1
in /etc/squid3/squid.conf
and this line in cron:
Code:
55 23 * * *           root       /usr/bin/squid –k rotate
?
 
Old 03-06-2014, 02:50 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by cccc View Post
Hi

I have Squid Cache: Version 3.1.20 installed on Debian and I'm using Sarg to generate Proxy HTML reports.
My questions is, do I lost squid logfiles from last 14 days using:
Code:
logfile_rotate = 1
in /etc/squid3/squid.conf
and this line in cron:
Code:
55 23 * * *           root       /usr/bin/squid –k rotate
?
From the documented squid.conf:

Code:
#  TAG: logfile_rotate
#       Specifies the number of logfile rotations to make when you
#       type 'squid -k rotate'. The default is 10, which will rotate
#       with extensions 0 through 9. Setting logfile_rotate to 0 will
#       disable the file name rotation, but the logfiles are still closed
#       and re-opened. This will enable you to rename the logfiles
#       yourself just before sending the rotate signal.
#
#       Note, the 'squid -k rotate' command normally sends a USR1
#       signal to the running squid process.  In certain situations
#       (e.g. on Linux with Async I/O), USR1 is used for other
#       purposes, so -k rotate uses another signal.  It is best to get
#       in the habit of using 'squid -k rotate' instead of 'kill -USR1
#       <pid>'.
#
#       Note, from Squid-3.1 this option has no effect on the cache.log,
#       that log can be rotated separately by using debug_options
#Default:
# logfile_rotate 10
You can specify generations to keep here, along with frequency (via cron), so you can customize to your liking.

In your posting, it looks like you're rotating logs daily and only keeping a single generation.

Last edited by anomie; 03-06-2014 at 02:52 PM.
 
1 members found this post helpful.
Old 04-24-2014, 11:20 AM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,623

Original Poster
Rep: Reputation: 51
THX!
 
  


Reply

Tags
log files, rotate, squid, squid3



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
[SOLVED] Logs not Rotating Properly. anishkumarv Linux - Server 4 11-27-2012 08:39 PM
[SOLVED] Logs not rotating anon091 Linux - Newbie 5 08-17-2012 06:16 AM
Logs not rotating Arty Ziff Linux - Server 5 01-04-2011 01:51 AM
Rotating logs in squid 2.7 stable9 arunabh_biswas Linux - Server 3 08-16-2010 02:18 AM
Squid and rotating logs using crond 80s Linux - Software 0 02-21-2003 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:45 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