[10565] in Athena Bugs
decmips 7.4H: newsyslog(8)
daemon@ATHENA.MIT.EDU (mhpower@Athena.MIT.EDU)
Thu Jun 17 21:59:24 1993
From: mhpower@Athena.MIT.EDU
To: bugs@Athena.MIT.EDU
Date: Thu, 17 Jun 93 21:58:04 EDT
System name: w20-575-68
Type and version: KN02ba 7.4H
Display type: PMAGB-BA
What were you trying to do?
Find out how to get my log files trimmed.
What's wrong:
The man page doesn't adequately explain the semantics of "*" in
the fields "size of archives" and "number of hours". In
particular, it isn't clear whether the "* *" combination means
that the logfile is unconditionally trimmed, or unconditionally
left unmodified. Also, one of the sentences attempting to
explain this uses "the the" where "then the" is intended.
Finally, in one place the "number of hours" field is instead
referred to as the "archive interval" field, an unnecessary
inconsistency.
The man page also doesn't tell the user that these fields can't
be 0, and that they can't have floating-point values.
What should have happened:
Just stick this section of code in the man page. Then everyone
will know what's going on:
if (((ent->size > 0) && (size >= ent->size)) ||
((ent->hours > 0) && ((modtime >= ent->hours)
|| (modtime < 0)))) {
Alternatively, apply this patch to the man page:
*** newsyslog.8.old Thu Jun 17 21:08:03 1993
--- newsyslog.8 Thu Jun 17 21:24:52 1993
***************
*** 55,57 ****
.br
! archive interval
.br
--- 55,57 ----
.br
! number of hours
.br
***************
*** 84,88 ****
.IR archives ,
! the logfile becomes trimmed as described above. If this field is
! replaced by a ``*'', then the size of the logfile is not taken into
! account when determining when to trim the log file.
.PP
--- 84,90 ----
.IR archives ,
! the logfile becomes trimmed as described above. The size may be a
! nonzero integer value, in kilobytes. It may also be ``*'', meaning
! that the logfile will not be trimmed unless the
! .I number of hours
! criterion is met (see below).
.PP
***************
*** 91,95 ****
entry specifies the time separation between the trimming of the log
! file. If this field is replaced by a ``*'', the the number of hours
! since the last time the log was trimmed will not be taken into
! consideration.
.PP
--- 93,98 ----
entry specifies the time separation between the trimming of the log
! file. The number may be any nonzero integer. It may also be ``*'',
! meaning that the logfile will not be trimmed unless the
! .I size of archives
! criterion is met (see above).
.PP
Please describe any relevant documentation references:
newsyslog(8)