From owner-freebsd-questions Sun Mar 2 16:43: 0 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D78037B401 for ; Sun, 2 Mar 2003 16:42:59 -0800 (PST) Received: from cultdeadsheep.org (charon.cultdeadsheep.org [80.65.226.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8534143F85 for ; Sun, 2 Mar 2003 16:42:57 -0800 (PST) (envelope-from sheepkiller@cultdeadsheep.org) Received: (qmail 18935 invoked from network); 3 Mar 2003 00:42:56 -0000 Received: from unknown (HELO lucifer.cultdeadsheep.org) (192.168.0.2) by goofy.cultdeadsheep.org with SMTP; 3 Mar 2003 00:42:56 -0000 Date: Mon, 3 Mar 2003 01:43:23 +0100 From: Clement Laforet To: "Chad Kline" Cc: freebsd-questions@freebsd.org Subject: Re: log rotation Message-Id: <20030303014323.3097a56e.sheepkiller@cultdeadsheep.org> In-Reply-To: References: Organization: tH3 cUlt 0f tH3 d3@d sH33p X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd4.7) X-Face: ._cVVRDn#-2((lnfi^P7CoD4htI$4+#G/G)!w|,}H5yK~%(3-C.JlEYbOjJGFwJkt*7N^%z jYeu[;}]}F"3}l5R'l"X0HbvT^D\Q&%deCo)MayY`);TO Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 02 Mar 2003 23:50:55 +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. Daemons write logs to a file descriptor (fd) without a syscall it can't change fd. using mv on a local file system use rename(), so fd is the same, and daemon fills this fd. Usually you can send a kill -HUP to the daemon to make him look for a new fd. tipically : mv current.log old.log kill -HUP gzip -9 old.old and it should work clem To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message