Current time: 11-25-2024, 02:13 PM Hello There, Guest! (LoginRegister)


Post Reply 
Over 40GB log files how to reduce logging?
Author Message
Outbreaker Offline
Junior Member
*

Posts: 14
Joined: Dec 2010
Reputation: 0
Post: #1
Over 40GB log files how to reduce logging?
HI Smile

Yesterday i noticed that i had only 10 GB of free hard disk space. After searching i found out that the folder "/var/log/apache2" has log files over 3GB's how can i fix this so only X days are logged?
(This post was last modified: 11-22-2011 12:53 AM by Outbreaker.)
11-22-2011 12:50 AM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #2
RE: Over 40GB log files how to reduce logging?
Take a look at the logrotation scripts you find below /etc/logrotation/ .. you may need to change the path's there. Alternatively you can create a simple cronjob ala :

find /var/log/apache2 -ctime +60 |xargs rm -f

um alle Dateien älter als 60 Tage zu löschen.
Das ist natürlich die Holzhammermethode. logrotation is besser Wink
11-24-2011 08:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Outbreaker Offline
Junior Member
*

Posts: 14
Joined: Dec 2010
Reputation: 0
Post: #3
RE: Over 40GB log files how to reduce logging?
Ok did set in the /etc/logrotate.d/ispcp file under:
/var/log/apache2/*.log {
rotate 52
TO
rotate 1

Hop this will fix it one year of log files is over kill.
(This post was last modified: 12-01-2011 10:34 AM by Outbreaker.)
12-01-2011 10:31 AM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #4
RE: Over 40GB log files how to reduce logging?
hehe very well ... one year is a bit too much.
12-02-2011 08:35 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)