Lowyat.NET Forums

Welcome Guest ( Log In | Register )

LYN wins Intel-Lenovo-Tangs Blogathon challenge. Thank you everybody!
 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> Gentoo with postfix, /var/log file

jojoe
post Sep 25 2009, 12:46 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Getting Started
**

Group: Junior Member
Posts: 178
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2005




hi all experts...


i have a gentoo server running with postfix mail..... recently i encounter the hdd spacing getting lower and causing the postfix not functioning.

i look the in /var/log/* directory.... there is few file with huge file size

1) /var/log/mail.info --> 4.1GB
2) /var/log/syslog --> 7xxMB
3) /var/log/mail.warm -->2xxMB
4) /var/log/apache2
5) /var/log/auth.log

is it safe to delete the file?s
i deleted before /var/log/mail.log which is about 2GB.... there is no impart to the gentoo and postfix.

this time the /var/log/mail.log is about 2xxMB only which i also deleted just now.... i think it can't last long as the size is only 2xxMB.
i need to know that other files are safe to delete ? any1 delete these files before?

any proper way to reduce of these file size?


Thanks in advance.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
HolgiB
post Sep 25 2009, 05:11 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


Newbie
*

Group: Junior Member
Posts: 17
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Aug 2007





QUOTE(jojoe @ Sep 25 2009, 12:46 PM)
i look the in /var/log/* directory.... there is few file with huge file size

1) /var/log/mail.info --> 4.1GB
2) /var/log/syslog --> 7xxMB
3) /var/log/mail.warm -->2xxMB
4) /var/log/apache2 
5) /var/log/auth.log

is it safe to delete the file?s



No worries. These are just logs. Delete them when you are running out of space.

I would suggest to check if the package "logrotate" is installed. It should zip the logfiles when they reach a certain age or size. Sounds for me that it is missing on your server.

Holger
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jojoe
post Sep 25 2009, 08:30 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #3


Getting Started
**

Group: Junior Member
Posts: 178
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2005




actually not not really know about the linux system....
install by ex-colleague but surprising...... few years already no problem.... accept insufficient disk space...
i read some forum.... it can do a script to purge or delete the file when it reach to certain file size...
as you mention also there is rotate the log file but i not really understand...
however, if the file is safe delete.... i think will manual delete it.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
amirsubhi
post Sep 26 2009, 01:53 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #4


The Power Is IN Your Hand!
*****

Group: Senior Member
Posts: 994
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Apr 2005
From: SumwHeRe In MaLaYsIa






well..can i ask

how many mail goes through everyday that make that log file became 4gb..and how long it takes roughly to reach 2gb of log...

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jojoe
post Sep 26 2009, 03:20 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #5


Getting Started
**

Group: Junior Member
Posts: 178
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Oct 2005




how long will get 2gb log.... hmmeemm i really dont know...
i believe should be around 2 years
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
abubin
post Sep 26 2009, 03:53 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #6


Look at all my stars!!
*******

Group: Senior Member
Posts: 4,219
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003






You can use logrotate with compression.

Google for logrotate howto and enable compression. Logs files are highly compressable. You 2GB file can become a mere 200mb.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
nlinley
post Sep 28 2009, 02:55 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #7


Getting Started
Group Icon
Linux & Open Source Software

Group: Elite
Posts: 156
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: May 2006
From: Puchong





In addition to the logrotation you can also adjust your syslog configuration to reduce the amount of stuff being logged. If you don't find a lot of information messages useful you can just cut down logging to errors only. No need to fill up the disk and rotate junk you don't need.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
biatch0
post Sep 30 2009, 12:46 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #8


Tem Que Valer
Group Icon

Group: VIP
Posts: 1,331
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003






hay doods it's gentoo

(1) emerge logrotate
(2) ???
(3) profit!!!
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
NoPurpose
post Oct 14 2009, 11:26 AM
Show posts by this member only |This post's rating (0+, 0-) | Post #9


Newbie
*

Group: Junior Member
Posts: 40
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jul 2008






don't delete it.

when you delete this file, you will need to recreate it back.

just empty it, ( # > /var/log/mail.info )

your postfix not functioning bcoz the mail.info log file more than 4GB, most linux kernel default build max size for single file is 4GB.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 23rd November 2009 - 11:24 PM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)