[Kea-users] Log rotation - SIGHUP?
mrobti at insiberia.net
Mon Nov 14 22:44:39 UTC 2016
On 2016-11-14 05:22, Thomas Markwalder wrote:
> On 11/14/16 12:44 AM, MRob wrote:
>> After rotating Kea logs, is a SIGHUP sufficient to get each of the Kea
>> servers to start using their new log files?
>> Kea-users mailing list
>> Kea-users at lists.isc.org
> It should be. Ultimately it depends on how you've configured your
> logging and how you are rotating the log the files. Sending SIGHUP
> cause Kea servers to reload their configuration, which in turn will
> cause it to reconfigured its loggers. If you have configured your
> logger(s) to write to explicit files, the files will be closed and
> If the only reason you're issuing the SIGHUP is to rotate the files,
> there are ways to do it without causing the server to reload its
> configuration. The most obvious way would be to use the "syslog" log
> destination and configure syslog (or rsyslog depending on your OS) to
> the log rotation for you.
> If you prefer using explicitly named files and managing the log
> on your own, then you could simply copy the Kea log file to the
> appropriate rotate name, cat /dev/null to the Kea log file, and you're
> done, no SIGHUP necessary. For example, if your logger config were
> "loggers": [
> "name": "kea-dhcp4",
> "output_options": [
> "output": "/tmp/kea.log"
> "severity": "DEBUG",
> Then as root, you could do something like this:
> # cp /tmp/kea.log /tmp.kea.log.1
> # cat /dev/null > /tmp/kea.log
> This works fine for me under Centos.
> Hope that helps.
Thank you. I'm adding a kea entry to the logrotate system - although I
can make logrotate do as you suggest ("copytruncate" option), I prefer
more atomic action of move old file.
Is SIGHUP extremely disruptive to Kea?
More information about the Kea-users