LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 08-19-2004, 08:00 AM   #1
sdebiasio
LQ Newbie
 
Registered: Jul 2004
Posts: 22

Rep: Reputation: 15
How to reset access log files safely?


Hello there,

I am hoping someone can help!

I have a client with a very busy, traffic-heavy site, for whom we keep the logs. Previously the logs were configured to rotate and compress each week; somehow when we switched to a new drive this functionality got obliterated. The current raw log file is enormous.

I tried doing the log rotation with another client, and it worked fine. The existing large access_log file was zipped up into two .gz files and the access_log file was reset to 0.

However with this other client I was not able to get the same results. This is the syntax I'm using:

/home/clientabc/logs/access_log {
compress
size=1000000b
sharedscripts
postrotate
/sbin/killall -HUP httpd
endscript
}

I wanted the files to zip up when they reach 1000000b in size and for the raw log file to reset at that point. When I ran this command, it didn't work. I was expecting the current raw log which is a whopping 200,000,000 b in size to be zipped up into smaller files.

What am I missing to get this to execute properly?


Last edited by sdebiasio; 08-19-2004 at 01:55 PM.
 
Old 08-19-2004, 01:55 PM   #2
sdebiasio
LQ Newbie
 
Registered: Jul 2004
Posts: 22

Original Poster
Rep: Reputation: 15
Anyone? anyone?
 
Old 08-19-2004, 02:50 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Firstly, you already have this thread going.
Secondly, you bumped it within 5 hours, the
forum rules say 24.


Cheers,
Tink
 
  


Closed Thread



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
sendmail -- cpu load high & log huge !! ranger_nemo Linux - Software 2 06-08-2004 12:06 PM
huge log files - how do i shortn them? rosscopeeko Linux - General 2 03-30-2004 09:59 AM
Huge Firewall Log Files seanfitz Linux - Networking 1 01-29-2004 10:23 AM
Huge log files altor Linux - Newbie 4 09-03-2003 08:40 AM
HUGE sendmail log magyartoth Linux - General 2 02-19-2002 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:09 AM.

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