[BACK]Return to newsyslog.8 CVS log [TXT][DIR] Up to [local] / src / usr.bin / newsyslog

Diff for /src/usr.bin/newsyslog/newsyslog.8 between version 1.32 and 1.33

version 1.32, 2003/02/09 07:26:45 version 1.33, 2003/02/12 19:17:36
Line 77 
Line 77 
 has the next to last  has the next to last
 period's logs in it, and so on, up to a user-specified number of  period's logs in it, and so on, up to a user-specified number of
 archived logs.  archived logs.
 Optionally the archived logs can be compressed to save space.  The archived logs may be optionally compressed to save space.
 .Pp  .Pp
 The options are as follows:  The options are as follows:
 .Bl -tag -width Ds  .Bl -tag -width Ds
Line 116 
Line 116 
 .Xr syslogd 8 ,  .Xr syslogd 8 ,
 so this option should only be used in debugging.  so this option should only be used in debugging.
 .It Fl v  .It Fl v
 Be verbose.  Place
   .Nm newsyslog
   in verbose mode.
 In this mode it will print out each log and its  In this mode it will print out each log and its
 reasons for either trimming that log or skipping it.  reasons for either trimming that log or skipping it.
 .It Fl a Ar directory  .It Fl a Ar directory
Line 180 
Line 182 
 The fields of the configuration file are as  The fields of the configuration file are as
 follows:  follows:
 .Bl -tag -width XXXXXXXXXXXXXXXX  .Bl -tag -width XXXXXXXXXXXXXXXX
 .It logfile name  .It Ar logfile_name
 The full pathname of the system log file to be archived.  The full pathname of the system log file to be archived.
 .It owner.group of archives (optional)  .It Ar owner:group
 Specify an ownership and group for the archive file.  This optional field specifies the owner and group for the archive file.
 The  The
 .Ql \&.  .Ql :
 is essential, even if the  is essential, even if the
 .Ar owner  .Ar owner
 or  or
Line 193 
Line 195 
 field is left blank.  field is left blank.
 The fields may be numeric, or a name which is looked up  The fields may be numeric, or a name which is looked up
 in the system password and group databases.  in the system password and group databases.
 .It mode of logfile & archives  For backwards compatibility, a
 Octal mode of created log files and archives.  .Ql \&.
 .It number of archives  may be used instead of a
 Specify the number of archives to be kept besides the log file itself.  .Ql : .
 .It size of archives  .It Ar mode
   File mode (in octal) to use for created log files and archives.
   .It Ar count
   The number of archives to be kept besides the log file itself.
   .It Ar size
 When the size of the log file (in kilobytes) reaches this point, the log  When the size of the log file (in kilobytes) reaches this point, the log
 file is trimmed as described above.  file is trimmed as described above.
 If this field is replaced by a  If this field is replaced by an
 .Ql * ,  .Ql \&* ,
 then the size of  then the size of
 the log file is not taken into account when determining when to trim the  the log file is not taken into account when determining when to trim the
 log file.  log file.
Line 212 
Line 218 
 .Nm  .Nm
 from rotating files consisting solely of a message indicating  from rotating files consisting solely of a message indicating
 that the log file has been turned over.  that the log file has been turned over.
 .It archive interval  .It Ar when
 Specify the time separation between the trimming of the log file.  
 If this field is replaced by a  
 .Ql * ,  
 the number of hours since the last time the  
 log was trimmed will not be taken into consideration.  
 .It flags (optional)  
 The  The
   .Ar when
   field can consist of an interval, a specific time, or both.
   If the
   .Ar when
   field consists of an asterisk
   .Pq Ql \&* ,
   log rotation will depend only on the contents of the
   .Ar size
   field.
   Otherwise, the
   .Ar when
   field consists of an optional interval in hours, possibly followed
   by an
   .So Li \&@ Sc Ns No -sign
   and a time in a restricted
   .Tn ISO 8601
   format or by a
   .So Li \&$ Sc Ns No -sign
   and a time specification for logfile rotation at a fixed time once
   per day, per week or per month.
   .Pp
   If a time is specified, the log file will only be trimmed if
   .Nm
   is run within one hour of the specified time.
   If an interval is specified, the log file will be trimmed if that
   many hours have passed since the last rotation.
   When both a time and an interval are specified, both conditions
   must be satisfied for the rotation to take place.
   .Pp
   There is no provision for the specification of a timezone.
   There is little point in specifying an explicit minutes or seconds
   component in the current implementation, since the only comparison is
   .Sq within the hour .
   .Ss ISO 8601 restricted time format
   The lead-in character for a restricted
   .Tn ISO 8601
   time is an
   .So Li \&@ Sc Ns No -sign .
   The particular format of the time in restricted
   .Tn ISO 8601
   is:
   .Sm off
   .Oo Oo Oo Oo Oo
   .Va \&cc Oc
   .Va \&yy Oc
   .Va \&mm Oc
   .Va \&dd Oc
   .Oo Li \&T
   .Oo Va \&hh
   .Oo Va \&mm
   .Oo Va \&ss
   .Oc Oc Oc Oc Oc .
   .Sm on
   Optional date fields default to the appropriate component of the
   current date; optional time fields default to midnight
   For example, if today is January 22, 1999, the following date specifications
   are all equivalent:
   .Pp
   .Bl -item -compact -offset indent
   .It
   .Ql 19990122T000000
   .It
   .Ql 990122T000000
   .It
   .Ql 0122T000000
   .It
   .Ql 22T000000
   .It
   .Ql T000000
   .It
   .Ql T0000
   .It
   .Ql T00
   .It
   .Ql 22T
   .It
   .Ql \&T
   .It
   .Ql \&
   .El
   .Ss Day, week and month time format
   The lead-in character for day, week and month specification is a
   .So Li \&$ Sc Ns No -sign .
   The particular format of day, week and month specification is:
   .Op Va D\&hh ,
   .Op Va W\&w Ns Op Va D\&hh
   and
   .Op Va M\&dd Ns Op Va D\&hh ,
   respectively.
   Optional time fields default to midnight.
   The ranges for day and hour specifications are:
   .Pp
   .Bl -tag -width Ds -compact -offset indent
   .It Ar hh
   hours, range 0 ... 23
   .It Ar w
   day of week, range 0 ... 6, 0 = Sunday
   .It Ar dd
   day of month, range 1 ... 31, or the letter
   .Em L
   or
   .Em l
   to specify the last day of the month.
   .El
   .Ss Some examples:
   .Bl -tag -width Ds -compact -offset indent
   .It Ar $D0
   rotate every night at midnight
   (same as
   .Ar @T00 )
   .It Ar $D23
   rotate every day at 23:00 hr
   (same as
   .Ar @T23 )
   .It Ar $W0D23
   rotate every week on Sunday at 23:00 hr
   .It Ar $W5D16
   rotate every week on Friday at 16:00 hr
   .It Ar $M1D0
   rotate on the first day of every month at midnight
   (i.e., the start of the day; same as
   .Ar @01T00 )
   .It Ar $M5D6
   rotate on every 5th day of the month at 6:00 hr
   (same as
   .Ar @05T06 )
   .El
   .Pp
   .It Ar flags
   The optional
 .Ar flags  .Ar flags
 field specifies if the archives should have any special processing  field specifies if the archives should have any special processing
 done to the archived log files.  done to the archived log files.
Line 245 
Line 375 
 The  The
 .Sq F  .Sq F
 flag specifies that symbolic links should be followed.  flag specifies that symbolic links should be followed.
 .It monitor notification (only used with the `M' flag)  .It Ar monitor
 Specify the username (or email address) that should receive notification  Specify the username (or email address) that should receive notification
 messages if this is a monitored log file.  messages if this is a monitored log file.
 Notification messages are sent as email; the operator  Notification messages are sent as email; the operator
 deserves what they get if they mark the  deserves what they get if they mark the
 .Xr sendmail 8  .Xr sendmail 8
 log file as monitored.  log file as monitored.
 .It pid file (optional)  This field is only valid when the
 Specify a file containing the PID of a process to send a  .Sq M
 .Dv SIGHUP  flag is set.
 signal to instead of  .It Ar pid_file
   This optional field specifies a file containing the PID of a process to send a
   signal (usually
   .Dv SIGHUP )
   to instead of
 .Pa /var/run/syslog.pid .  .Pa /var/run/syslog.pid .
 .It signal (optional)  .It Ar signal
 Specify the signal to send to the process instead of  Specify the signal to send to the process instead of
 .Dv SIGHUP .  .Dv SIGHUP .
 Signal names  Signal names
Line 265 
Line 399 
 .Dq SIG  .Dq SIG
 and be the signal name, not the number, e.g.,  and be the signal name, not the number, e.g.,
 .Dv SIGUSR1 .  .Dv SIGUSR1 .
 .It command (optional)  .It Ar command
 Specify a command to run instead of sending a signal to the process.  This optional field specifies a command to run instead of sending a signal
   to the process.
 The command must be enclosed in double quotes  The command must be enclosed in double quotes
 .Pq Ql \&" .  .Pq Ql \&" .
 The empty string,  The empty string,

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33