Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2001 09:48:20 -0400
From:      "Dan Langille" <dan@langille.org>
To:        doc@freebsd.org
Subject:   newsyslog and $MLD0
Message-ID:  <200107171348.f6HDmM477821@lists.unixathome.org>

next in thread | raw e-mail | index | archive | help
I think we should slightly modify the man page.  Not because it's wrong, 
but because it gives an example, which although correct, it causes a 
problem.  With me at least.  And I've checked with others.  They have 
the same miscomprehension.

Reading man newsyslog you will find:

  $MLD0   rotate at the last day of every month at midnight

I have an entry in newsyslog.conf which looks like this:

  /var/log/radacct/pm3/detail 640  12  *  $MLD0 Z   /var/run/radiusd.pid

I thought that would be good for monthly logs.  But it's not.  Midnight is 
the start of the day, not the end of the day.  So at the start of Jun 30, 
the logs are rotated.  And the entries for Jun 30 are in 
/var/log/radacct/pm3/detail, not /var/log/radacct/pm3/detail.0.gz.  Jun 30 
will be in the same file as Jul 1.

newsyslog works as advertised.  I don't dispute that.  It's just that most 
people *think* midnight is the end of the day.  It's not.  It's the start of 
the day.

I propose we modify the man page to be a bit more helpful.  What about 
adding this?

$M1D0   rotate at the first day of every month at midnight (note that
              midnight is at the start of the day)

Suggestions for a better neon sign are welcome.

-- 
Dan Langille
pgpkey - finger dan@unixathome.org | http://unixathome.org/finger.php

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107171348.f6HDmM477821>