On 2007-05-31 14:05, Philippe Vogel wrote:
<snip>
Nice tip! To avoid unreadable long logfiles editing logrotate service to rotate your logs in fixed periods, like monthly. Thanks. I hope I got every bracket and brace correct, and everything else as well :-)
You are quite correct about rotating the file so it doesn't become too large, particularly on a very busy system.
To proceed add this extra lines to /etc/logrotate.conf:
/var/log/auth.log { monthly create 0660 root root rotate 1 }
Two observations: on a busy system it might be necessary to rotate more frequently, eg. "weekly" instead of "monthly" or even with "size <n>" (see man logrotate for all the syntax). Also, the "rotate 1" command will keep only 1 previous file. Some admins, eg. at a corporation, might want to keep the files around longer than just 2 months, so they could increase the number, ie. "rotate 12" would keep the information for the previous year (assuming a monthly rotation). It is also possible to use "maxage <days>" instead. All of that is of course probably OT for this list :-) -- Hypocrisy is the homage vice pays to virtue. -- François de La Rochefoucauld --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-security+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-security+help@opensuse.org