[PREVIOUS CHAPTER] [______TOC_______]

6 other tips

    6.1	Cron Runs Newsyslog (obsolete)

    Example(Vixie cron):

    0 6 * * 0 (chdir dir-of-fml; sh bin/newsyslog.sh log var/log)

    FYI: msend.pl runs newsyslog in default.  msend.pl does not run
    newsyslog if $NOT_USE_NEWSYSLOG = 1; is defined.

    	$NOT_USE_NEWSYSLOG = 1; (default 0)

    6.2	Turn over actives/members files: .bak => .0 =>.1

    When fml operates actives and members file, fml saves the previous
    content in file.bak e.g. actives.bak and members.bak. In default
    fml appends content to file.bak in one week. If the file size is over

    	$AMLIST_NEWSYSLOG_LIMIT	(default 50*3000 = 150K bytes)

    fml turns over the file like this:

    	file.bak       -> var/log/file.0
    	var/log/file.0 -> var/log/file.1
    	...

    Independtly from this turn over, fml can save the previous content by
    RCS. If you use this, please define

    	$AMLIST_BACKUP_TYPE = "rcs"; (default "")

    6.3	Turn over log file ($DIR/log)

    If the log file excees the threshold $LOGFILE_NEWSYSLOG_LIMIT size
    (bytes), fml turns over the log file
    	log -> log.0 -> log.1 ...
    The threshold is defined by this variable

    	$LOGFILE_NEWSYSLOG_LIMIT (default "")

    The unit is bytes. You can use 10K (10 Kiro bytes) and 1M (1 Mega
    bytes) syntaxes.

    6.4	Newsyslog; To Maintenance Log Files

    newsyslog(8) is a log maintainer program. FML provides simplified
    version of it.

           Newsyslog  is  a  program  that should be scheduled to run
           periodically by crontab.  When it is executed it  archives
           log  files  if  necessary.  If a log file is determined to
           require archiving, newsyslog rearranges the files so  that
           ``logfile''  is empty, ``logfile.0'' has the last period's
           logs in it, ``logfile.1'' has the next  to  last  period's
           logs  in  it,  and so on, up to a user-specified number of
           archived logs.  Optionally the archived logs can  be  com-
           pressed to save space.

    msend.pl (digest program) runs newsyslog for files defined by
    @NEWSYSLOG_FILES.

    	@NEWSYSLOG_FILES =
    	   ("$MSEND_RC.bak", "$MEMBER_LIST.bak", "$ACTIVE_LIST.bak")

    	rm -f var/log/members.4
    	mv -f var/log/members.3 var/log/members.4
    	mv -f var/log/members.2 var/log/members.3
    	mv -f var/log/members.1 var/log/members.2
    	mv -f var/log/members.0 var/log/members.1
    	ln -s members.bak 	var/log/members.0

    To apply newsyslog to another files, please add them to
    @NEWSYSLOG_FILES.

    @NEWSYSLOG_FILES =
    	("$MSEND_RC.bak", "$MEMBER_LIST.bak", "$ACTIVE_LIST.bak", "log")