Re: 6.2: maillog grows, newsyslog's misbehaving ?



At 1:08 PM +0200 5/28/07, Andreas Klemm wrote:
Hi,

discovered that the maillog file on my freebsd Desktop
grows and grows (now at 50MB).

According to the newsyslog.conf file it should be trimmed
every night at midnight.

/var/log/maillog 640 7 * @T00 JC

Is it a prerequisite, that the system then runs 24x7 so
that the newsyslog default settings work ?

As mentioned in the man page for newsyslog.conf :

If a time is specified, the log file will only be trimmed if
newsyslog(8) is run within one hour of the specified time.

You could force a rotate by running newsyslog yourself:

/usr/sbin/newsyslog -F /var/log/maillog

but that would be a one-time fix.

There is a startup file for newsyslog in /etc/rc.d which runs the
program one-time at startup. You could set an alternate value
for the variable 'newsyslog_flags' in your /etc/rc.conf file, and
use that to do the checks you want at startup. This would probably
mean creating a duplicate newsyslog.conf file.

So, to answer your question: Yes, the default settings for
newsyslog.conf do assume that your system is running 24x7.

--
Garance Alistair Drosehn = gad@xxxxxxxxxxxxxxxxxxxx
Senior Systems Programmer or gad@xxxxxxxxxxx
Rensselaer Polytechnic Institute or drosih@xxxxxxx
_______________________________________________
freebsd-stable@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@xxxxxxxxxxx"