[ntp:questions] ntpd interfacing with newsyslog/logrotate?
kostecke at ntp.org
Sat Apr 21 23:19:17 UTC 2012
On 2012-04-21, unruh <unruh at invalid.ca> wrote:
> On 2012-04-21, A C <agcarver+ntp at acarver.net> wrote:
>> Does anyone familiar with NetBSD know if there's a particular
>> configuration for newsyslog that will allow the main ntpd log to
>> rotate on a regular basis? It seems that ntpd loses track of its log
>> file during a rotate and stops updating.
> I do not know, but it is possible that ntpd does not regualrly close
> its log files.
ntpd does rotate the stats log files. See
> Thus when the log file gets moved (renamed) and a new log file
> opened, ntp keeps using the old one (remmeber that the files are not
> referenced by name but by inode). So look in the old file and see if
> it is being updated. Then you have to persuade ntpd to close the old
> log files and then reopen which will open the new one.
ntpd can log to either the system syslog facility or the alternate
logfile log file. See http://doc.ntp.org/4.2.6p5/miscopt.html#logconfig
I have, in the past (e.g. with ntp3), seen that if you specify a
separate logfile with the 'logfile' directive that it is not rotated the
way that 'filegen' files are.
If you use ntpd with the system syslog facility log rotation is not an
Steve Kostecke <kostecke at ntp.org>
NTP Public Services Project - http://support.ntp.org/
More information about the questions