From owner-freebsd-questions@FreeBSD.ORG Wed Oct 18 14:35:43 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 57E5516A403 for ; Wed, 18 Oct 2006 14:35:43 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A46843D53 for ; Wed, 18 Oct 2006 14:35:22 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-2) with ESMTP id k9IEYxh3017517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 18 Oct 2006 17:35:00 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.8/8.13.8) with ESMTP id k9IEZWmO059976; Wed, 18 Oct 2006 17:35:34 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.8/8.13.8/Submit) id k9IEZS2l059975; Wed, 18 Oct 2006 17:35:28 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 18 Oct 2006 17:35:28 +0300 From: Giorgos Keramidas To: Matthew Seaman Message-ID: <20061018143528.GB59034@gothmog.pc> References: <45357AF8.1020101@rithy4u.net> <20061018014819.GA72686@gothmog.pc> <45360C5F.4090400@cogeco.ca> <20061018125755.GB15285@gothmog.pc> <45362D5B.3060401@infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45362D5B.3060401@infracaninophile.co.uk> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.578, required 5, AWL -0.18, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20, UNPARSEABLE_RELAY 0.00) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Paul Murphy , freebsd-questions@freebsd.org, root@rithy4u.net Subject: Re: File system full X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2006 14:35:43 -0000 On 2006-10-18 14:34, Matthew Seaman wrote: > Giorgos Keramidas wrote: > > The file `alias.log' is not rotated by `newsyslog.conf', so maybe we > > should add it there? Then we can let `newsyslog' signal `natd' by: > > > > %%% > > diff -r 4474abb9619a etc/newsyslog.conf > > --- a/etc/newsyslog.conf Fri Oct 13 17:34:54 2006 +0300 > > +++ b/etc/newsyslog.conf Wed Oct 18 15:54:52 2006 +0300 > > @@ -18,6 +18,7 @@ > > # > > # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] > > /var/log/all.log 600 7 * @T00 J > > +/var/log/alias.log 600 7 100 * JC /var/run/natd.pid > > /var/log/amd.log 644 7 100 * J > > /var/log/auth.log 600 7 100 * JC > > /var/log/console.log 600 5 100 * J > > %%% > > > > Can you please add this line to your newsyslog.conf file and let it run > > for a while to see if it prevents the `alias.log' file of `natd' to fill > > your /var/log filesystem? > > > > I don't use `natd', so I can't test this myself for a long enough > > period. > > natd doesn't do the close and re-open all filehandles thing on receipt > of SIGHUP which pretty much makes it unsuitable for use with newsyslog. > (SIGHUP is caught by natd, but the only thing it does is cause natd to > update its idea of what the IP address is on the nat'ed interface.) > > There doesn't seem to be any signal that you can send natd with the > usual 'reread all config files and re-open all file descriptors' > effect that most daemons understand. That's probably a bug, then, I guess. The fact that natd can keep a file open for an arbitrary amount of time and keep appending to it, until either natd dies or the file fills up an entire partition is not really a good idea :( I'll open a PR for this, and see if the people more knowledgeable with natd's internals can help with the SIGHUP-triggered actions of natd.