Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2003 13:37:45 +1300
From:      Jonathan Chen <jonc@chen.org.nz>
To:        Chad Kline <i18rabbit@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: log rotation
Message-ID:  <20030303003745.GA50087@grimoire.chen.org.nz>
In-Reply-To: <F25WFNonDcOmvgbUteE0000682a@hotmail.com>
References:  <F25WFNonDcOmvgbUteE0000682a@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 02, 2003 at 11:50:55PM +0000, Chad Kline wrote:
> 
> Since I upgraded to FreeBSD 4.7, I notice the
> following problem:
> 
> Once a month when my log files rotate
> (simply gzipping the old, and the creating a new empty log file
> via a cron job) the log files stay empty.  all permissions and ownerships 
> are correct.  it takes a "reboot" - then the
> daemons are able to fill up the new log files - but not
> until a reboot.

You should use newsyslog(8) and /etc/newsyslog.conf instead. Most loggers
(eg syslog) hold the file open for writes, and deleting the old one (by
gzipping) only removes the entry from the directory. The logger still
has it open and is still writing to the file (although you aren't able
to reference it anymore).
-- 
Jonathan Chen <jonc@chen.org.nz>
----------------------------------------------------------------------
                "I don't want to achive immortality through my works..
                 I want to achieve it through not dying" - Woody Allen

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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