Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Dec 1995 09:32:36 +0100 (MET)
From:      Thomas Graichen <graichen@omega.physik.fu-berlin.de>
To:        ache@astral.msk.su
Cc:        hackers@freebsd.org
Subject:   Re: weekly/monthly logs rotating idea (commit candidate)
Message-ID:  <199512220832.JAA26432@julia.physik.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
hasn't =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= said ? ...
> 
> Current logs rotating code
> 	...
> 	if [ -f $i.1 ]; then mv -f $i.1 $i.2; fi
> 	if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
> 	if [ -f $i ]; then mv -f $i $i.0; fi
> 	>$i
> isn't good for daemons, because thet keep log descriptor open.
> It means that daemon_log moved to daemon_log.0 and diagnostics
> still writted to daemon_log.0! New daemon_log leaves zero-sized
> until reboot.
> 
> What I suggest:
> 
> 	if [ -f $i.0 ]; then mv -f $i.0 $i.1; fi
> 	if [ -f $i ]; then cp -fp $i $i.0; fi
> 	>$i
> 
> It means that you copy log preserving file times and then
> zero the same descriptor.
> 
> If I not see objections with explanations, I plan to commit it.
> 
i plan to commit newsyslog from NetBSD which does all the rotation
automatically - you may configure it using /etc/newsyslog.conf

you may get my test-package from freefall

  ~graichen/misc/review.tgz

or via ftp from

  dirac.physik.fu-berlin.de:/pub/freebsd/misc/review.tgz

please look at it and send me all problems you find with it - i asked
around in hackers if there are any contra's to committing it - but i
got only pro's :-)

i plan to commit it between christmas and new year - if anybody will
test it before

t
  _______________________________________________________||___________________
                                                   __||
  Perfection is reached, not when there is no  __||     thomas graichen
  longer anything to add, but when there   __||    freie universitaet berlin
  is no longer anything to take away   __||           fachbereich physik
                                   __||                      
  - Antoine de Saint-Exupery - __||        graichen@mail.physik.fu-berlin.de
  ___________________________||__________________graichen@FreeBSD.org_________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512220832.JAA26432>