From owner-freebsd-questions Mon Mar 3 3:23: 2 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 0C5AA37B401 for ; Mon, 3 Mar 2003 03:23:01 -0800 (PST) Received: from hotmail.com (f123.law11.hotmail.com [64.4.17.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A23543F85 for ; Mon, 3 Mar 2003 03:23:00 -0800 (PST) (envelope-from i18rabbit@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 3 Mar 2003 03:23:00 -0800 Received: from 12.17.140.247 by lw11fd.law11.hotmail.msn.com with HTTP; Mon, 03 Mar 2003 11:23:00 GMT X-Originating-IP: [12.17.140.247] From: "Chad Kline" To: sheepkiller@cultdeadsheep.org Cc: freebsd-questions@freebsd.org Subject: Re: log rotation Date: Mon, 03 Mar 2003 11:23:00 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 03 Mar 2003 11:23:00.0345 (UTC) FILETIME=[3F8E6690:01C2E177] 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 for i in /var/run/*.pid; do kill -1 `head -n 1 $i`; done Thank you, this seems to have solved my problem nicely :) > > 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 _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message