newsyslog Revisited

| No TrackBacks

Earlier this month, I wrote about a new utility that handles log rotation in Leopard, and gave a tip on fixing logging for the mail.log. It turns out that my fix wasn't quite right...

The original line in the configuration file was as follows:

/var/log/mail.log 640 5 100 * J

This results in the log file being rotated when it reached 100Kb in size. What I wanted was for the logs to roll weekly as they had with prior systems, and my assumption was that this would continue to happen as part of the periodic.weekly script. Bad assumption.

I don't usually have to scroll too far back in my logs when researching things, but tonight discovered that I had entries going back more than a week, and that the log file wasn't rotating as I thought it should have been. A quick check of the periodic.weekly script revealed that log rotation wasn't there anymore, so I revisited the newsyslog.conf file, and made the following change:

/var/log/mail.log			640  5	   *	$W0D0     J

The asterisk there is in the size column, meaning don't worry about the log size, the $W0D0 is under the when column, this means to rotate weekly, on day 0 (Sunday), at hour 0 (12am).

The man page for newsyslog.conf gives a wealth of info on configuring this utility, and is well worth a read.

No TrackBacks

TrackBack URL:

November 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

About this Entry

This page contains a single entry by Jim published on November 22, 2007 11:35 PM.

Otterbox Defender case for iPhone was the previous entry in this blog.

Otterbox Defender case received is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 5.031