Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 2004 18:31:24 +0200
From:      Melvyn Sopacua <freebsd-questions@webteckies.org>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>, Canggung Mendonan <mendonan@absolute-p.ath.cx>, "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: ipmon fills up partition
Message-ID:  <200404171831.32687.freebsd-questions@webteckies.org>
In-Reply-To: <20040417160012.GA75477@happy-idiot-talk.infracaninophile.co.uk>
References:  <20040416230102.H2835@ybpnyubfg> <20040417160012.GA75477@happy-idiot-talk.infracaninophile.co.uk>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Saturday 17 April 2004 18:00, Matthew Seaman wrote:

> > Adding /var/run/ipmon.pid at the end of newsyslog.conf line above stops
> > the above symptom, but ipmon stopped logging after each rotation.
>
> This should be the correct thing to do: ipmon should interpret a HUP
> signal to mean 'reopen log files' -- unless it's changed dramatically
> between 4.x and 5.x[*], in which case you'll have to hunt down what
> should be done instead by reading the documentation or the code or
> something.

It does:
ipmon.c:1452
                       if (donehup) {
                                donehup = 0;
                                if (newlog) {
                                        fclose(log);
                                        log = newlog;
                                        newlog = NULL;
                                }
                        }


And:
static void handlehup(sig)
int sig;
{
        FILE    *fp;

        signal(SIGHUP, handlehup);
        if (logfile && (fp = fopen(logfile, "a")))
                newlog = fp;
        init_tabs();
        donehup = 1;
}

The only codepath I can see, that could cause this behavior, would be if the 
fopen fails, because newsyslog is holding a lock on the file at the time it 
signals ipmon.

-- 
Melvyn

=======================================================
FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Sun Apr  4 
02:24:06 CEST 2004     
root@sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG  i386
=======================================================

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBAgVvkOv9JNmfFN5URAp2dAJ0QDbqGPXOFa8VHsvIYRVtb/K7rZgCfSdOI
FGoTfNXYuigzq3WElwhrEew=
=0rnC
-----END PGP SIGNATURE-----
help

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