*BSD News Article 72807


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!oleane!jussieu.fr!math.ohio-state.edu!uwm.edu!news-res.gsl.net!news.gsl.net!news.mathworks.com!hunter.premier.net!news1.erols.com!news
From: Ken Bigelow <kbigelow@www.play-hookey.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Syslogd - buggy?
Date: Thu, 04 Jul 1996 09:37:17 -0700
Organization: A poorly-installed InterNetNews site
Lines: 29
Message-ID: <31DBF33D.DF@www.play-hookey.com>
References: <DtzLHy.5wn@rci.ripco.com> <4rfdvk$jd6@twwells.com>
NNTP-Posting-Host: kenjb05.play-hookey.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.02 (Win16; I)

T. William Wells wrote:
> 
> In article <DtzLHy.5wn@rci.ripco.com>, David Richards <dr@ripco.com> wrote:
> : If I manually create the files, it will use them, but it won't create
> : them if they don't exist. This breaks a lot of standard log rotating
> : scripts.
> 
> Syslogd has always refused to create files that don't exist.
> Your "standard" scripts are simply broken.

They may not be broken.

If your scripts are correctly written for rotating logs, they will start 
with the oldest log and do a "mv" to the next logfile in sequence, to the 
point where the very oldest logfile gets erased. The sequence of mv 
commands works backwards until the newest (current) logfile gets copied 
to its first backup name. Check /etc/monthly and /etc/weekly for a 
practical technique.

You will have to first create the initial logfiles, of course. Then your 
scripts can do the rotating.

-- 

Ken

Are you interested in   |
byte-sized education    |   http://www.play-hookey.com
over the Internet?      |