ipmon fills up partition
Melvyn Sopacua
freebsd-questions at webteckies.org
Sat Apr 17 09:31:36 PDT 2004
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 at sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG i386
=======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040417/8c5a26f9/attachment.bin
More information about the freebsd-questions
mailing list