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>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-02=_kvVgAGVHONF52m1 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D 0; if (newlog) { fclose(log); log =3D newlog; newlog =3D NULL; } } And: static void handlehup(sig) int sig; { FILE *fp; signal(SIGHUP, handlehup); if (logfile && (fp =3D fopen(logfile, "a"))) newlog =3D fp; init_tabs(); donehup =3D 1; } The only codepath I can see, that could cause this behavior, would be if th= e=20 fopen fails, because newsyslog is holding a lock on the file at the time it= =20 signals ipmon. =2D-=20 Melvyn =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =46reeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Sun Ap= r 4=20 02:24:06 CEST 2004 =20 root@sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --Boundary-02=_kvVgAGVHONF52m1 Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAgVvkOv9JNmfFN5URAp2dAJ0QDbqGPXOFa8VHsvIYRVtb/K7rZgCfSdOI FGoTfNXYuigzq3WElwhrEew= =0rnC -----END PGP SIGNATURE----- --Boundary-02=_kvVgAGVHONF52m1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404171831.32687.freebsd-questions>