Results 1 to 3 of 3
I know there are some logs ( system or application log ) in the system , but I have some experience that sometimes these logs will growth to a unlimited ...
- 02-24-2005 #1Just Joined!
- Join Date
- Feb 2005
- Posts
- 77
file size limit
I know there are some logs ( system or application log ) in the system , but I have some experience that sometimes these logs will growth to a unlimited size until the system is full ( maybe caused by system error ) , so that the system will be shutdown suddenly , is it possible to limit the log size ? or take some action such as gzip the file or inform system administrator when the file size over a certain of limit ? could provide suggestion ? thx.
- 02-24-2005 #2
Look into logrotate you can get it gzip and move your logs. This is a good reason why you should put /var on its own partition for servers, then if the logs fill up all the space left then the rest of the system will still live
- 02-24-2005 #3Just Joined!
- Join Date
- Feb 2005
- Posts
- 77
thx reply ,
I hv man the logrotate , it seems very good , but I am not too understand how to use it , I find the below example , I want to ask if I want to compress the /var/log/messages and mail to administrator when it reach 100M size , how to set it ? thx in advance.
# sample logrotate configuration file
compress
/var/log/messages {
rotate 5
weekly
postrotate
/sbin/killall -HUP syslogd
endscript
}


Reply With Quote
