Re: thoughts on /etc/newsyslog.conf

2001-04-19 Thread Michael Lucas

On Wed, Apr 18, 2001 at 10:13:26PM -0400, Matthew Emmerton wrote:
 You need ISO8601 to support rolling on fixed dates (1st of the month, etc.)
 
 You need 'W-D-M' format to support rolling on a weekly/monthly/daily basis.
 This can't be done using ISO8601 because ISO uses fixed dates. (How would
 you specify rotating every monday using ISO8601, when the date of every
 monday changes from month to month and year to year?)

What I'm suggesting is the default newsyslog.conf use WDM everywhere,
instead of being half WDM and half ISO8601.  Or is there something you
can do with ISO8601 that you can't do with WDM?  This would make
things more clear for the new administrator.

If the answer is "because we've always done it this way", then I'll
document it as such.  :)

--- newsyslog.conf-dist Thu Apr 19 10:10:11 2001
+++ newsyslog.conf  Thu Apr 19 10:11:33 2001
@@ -6,15 +6,15 @@
 /var/log/amd.log   644  7 100  * Z
 /var/log/kerberos.log  644  7 100  * Z
 /var/log/lpd-errs  644  7 100  * Z
-/var/log/maillog   644  7 *@T00  Z
+/var/log/maillog   644  7 *$H0   Z
 /var/log/sendmail.st   644  10*168   B
 /var/log/messages  644  5 100  * Z
-/var/log/all.log   600  7 *@T00  Z
+/var/log/all.log   600  7 *$H0   Z
 /var/log/slip.log  600  3 100  * Z
 /var/log/ppp.log   600  3 100  * Z
 /var/log/security  600  10100  * Z
-/var/log/wtmp  644  3 *@01T05 B
-/var/log/daily.log 640  7 *@T00  Z
+/var/log/wtmp  644  3 *$M1H5 B
+/var/log/daily.log 640  7 *$H0   Z
 /var/log/weekly.log640  5 1$W6D0 Z
 /var/log/monthly.log   640  12*$M1D0 Z
 /var/log/console.log   640  5 100  * Z


The sendmail.st rotation also seems odd: why rotate once a week at
some (essentially) randomly chosen time, rather than once a week at a
set time like the rest of the logs?  But that's a separate issue.

==ml

-- 
Michael Lucas
[EMAIL PROTECTED]
http://www.blackhelicopters.org/~mwlucas/
Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



thoughts on /etc/newsyslog.conf

2001-04-18 Thread Michael Lucas

not sure where to send this; it doesn't seem like fodder for any
other mailing list...

Hello,

In writing an article on syslogd and newsyslog, I've noticed something
intensely annoying about newsyslog.conf.

FreeBSD supports three different formats for dates in newsyslog.conf:
raw hours since last rotation, ISO 8601, and FreeBSD-specific
week-day-month.

Wouldn't it make sense to standardize on one or the other of ISO8601
or W-D-M for the default newsyslog.conf?  All of the existing entries
could easily be expressed in W-D-M.  Or is there some particular
reason why we must use both formats in the default file?  I'll be
happy to document it if that's the case.  I'd rather not try to
justify using different formats to a new user without such a reason,
however.

As someone writing documentation, I'd prefer W-D-M since it's easier
to explain.  :)

I will even volunteer patches to make it consistent in whatever form
is chosen -- although I suspect one of you real hackers could do it
with your eyes closed, I feel obliged to offer.

Thanks,
==ml

-- 
Michael Lucas
[EMAIL PROTECTED]
http://www.blackhelicopters.org/~mwlucas/
Big Scary Daemons: http://www.oreillynet.com/pub/q/Big_Scary_Daemons

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: thoughts on /etc/newsyslog.conf

2001-04-18 Thread Matthew Emmerton

 Hello,

 In writing an article on syslogd and newsyslog, I've noticed something
 intensely annoying about newsyslog.conf.

 FreeBSD supports three different formats for dates in newsyslog.conf:
 raw hours since last rotation, ISO 8601, and FreeBSD-specific
 week-day-month.

 Wouldn't it make sense to standardize on one or the other of ISO8601
 or W-D-M for the default newsyslog.conf?

You need 'raw hours' format to support relative times, commonly used with
size parameters to control the growth of web logs.  (ie "Rotate when size 
10M or 6 hours from last rotate")

You need ISO8601 to support rolling on fixed dates (1st of the month, etc.)

You need 'W-D-M' format to support rolling on a weekly/monthly/daily basis.
This can't be done using ISO8601 because ISO uses fixed dates. (How would
you specify rotating every monday using ISO8601, when the date of every
monday changes from month to month and year to year?)

As a point of reference, cron's time/date parameters are functionally a
combination of W-D-M and ISO8601.

--
Matt Emmerton


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message