Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Mar 2003 11:23:00 +0000
From:      "Chad Kline" <i18rabbit@hotmail.com>
To:        sheepkiller@cultdeadsheep.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: log rotation
Message-ID:  <F123OlZcb0KmiiySTky000162b3@hotmail.com>

next in thread | raw e-mail | index | archive | help

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
><fills old.log>
>kill -HUP <pid of daemon>
><fills current.old>
>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




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