LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-11-2010, 07:52 PM   #1
bsdfan
Member
 
Registered: Jun 2010
Distribution: Debian 5.0.2/openBSD3.3,3.6,4.0
Posts: 45

Rep: Reputation: -1
Squid access.log


Hi,

I run proxy in my office using debian lenny. My problem now is access.log is big as 200M. So i want to slice that access.log into 10M and it rotate weekly.
Code:
/var/log/squid/*.log {
        weekly
        size 10M
        compress
        rotate 4
        missingok
        copytruncate
        nocreate
        sharedscripts
        postrotate
        test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
        endscript
}
Seem when it's exceed to 10M it will not create new access.log. Please assist me.

Thanks.
 
Old 07-13-2010, 08:52 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it won't create anything? do you think the "nocreate" option might be relevant here?? In actual fact it's probably not as your oddly doing a copytruncate too, so it can never not leave a blank file if it truncates it. What happens to the file when you explicitly run a logrotate manually, with the -d option to debug it. Also try using -f to force it regardless of age.
 
  


Reply

Tags
squidaccesslog



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
convert LAN IP address to Host Name when I give cmd tail -f /var/log/squid/access.log rs15 Linux - Networking 6 01-22-2012 01:45 AM
Squid Proxy is unable to log "access.log" file. nishith Linux - Server 6 08-10-2008 12:00 AM
Can SQUID log skype calls,voip,chat programs in access.log revinking Linux - Newbie 6 07-27-2008 01:14 PM
My squid won't fill /var/log/squid/access.log linuxlah Linux - General 5 10-06-2003 10:51 PM
Squid access.log files davebarnes Linux - Networking 1 10-27-2002 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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