Hi,

We noticed recently that our openvassd log files are growing to the
maximum size permissible  (2 Gig), despite having log rotate
scripts in place.  The log rotate itself works, new log files are
created, but openvassd continues to log to the originally opened file.

When checking the openvassd code base, looking for the usual
SIGHUP handler that should process log rotation, we're only seeing
that it does a reload of scripts, but fails to call log_init
to re-initialize file logging.

Anything stand out here that we're doing wrong?  This used to work
at one point, but that may have been a number of releases back.
It's only recently become an issue after a client reported a
significant issue with scan times, and we found that we couldn't
back track the audit history, because once the log file hit the
2G mark, it refused to log anything else.

As best I can guess, the line
    log_init (prefs_get ("logfile"));

should be added to fucntion

   reload_openvassd()

in openvassd.c, (although I haven't tried that yet to see if that
resolved the problem, thought I'd ask first in case this whole
problem could be traced back to stupid user error on my part...)

Thomas

P.S. - for reference, our logrotate script looks like this, and
correctly rotates files, but the daemon only switches to the new
file if we completely terminate and restart it.

/var/log/openvas/openvassd.dump /var/log/openvas/openvassd.messages {
    weekly
    rotate 6
    missingok
    nocompress
    sharedscripts
    postrotate
kill -1 `cat /usr/local/var/run/openvassd.pid 2>/dev/null` 2>/dev/null || true
    endscript
}


_______________________________________________
Openvas-discuss mailing list
[email protected]
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to