ntpd configutration -- a small suggestion from the peanut gallery

Ronald F. Guilmette rfg at tristatelogic.com
Wed Jun 5 17:28:16 UTC 2019


In message <c705f5737cf441abe1b039b5d212ca34e98360d8.camel at smormegpa.no>, 
Matthias Oestreicher <matthias at smormegpa.no> wrote:

>NTP works out of the box, but does not accept big time changes unless you run it with
>the -g option. I think it's not ntp's fault.

OK.   Thanks.  It now appears that this was indeed the issue, and I did
need the -g option.  The ntpd daemon -was- dying entirely, shortly after
starting up, but now I have run it manually with the -g option and also
with the other options that it normally gets when it has been started
via "/etc/rc.d/ntpd start" and now all seems to be well.

(Apparently, adding ntpd_sync_on_start="YES" to /etc/rc.conf is the
particular magic that should be used to cause ntpd to always be started
with the -g option, which suits me just fine.  I'm not sure why this
isn't used by default, but I guess that some folks are a lot more
worried about their time getting set wrong somehow than I am.)

Just one more small thing... The man page for ntpd says, very explicitly,
undetr the description of the -g option, that when and if ntpd finds
that the time adjustment needed is too big, it will exit *and*  also
write a message (presumably explaining why it did that) to "the system
log".  I am assming that for a fresh new system that has not yet been
fiddled too much, that means the message in question... which explains
why ntpd has elected to commit suicide... should appear in the
/var/log/messages file.  Certainly I *am* seeing other messages from
ntpd in that file.  But I am quite certainly *not* seeing any message
in that file and tagged with the name "ntpd" that mentioned either that
ntpd was electing to commit suicide *or* the reason why it might be
doing so.

Did I just miss those ntpd death messages somehow?


More information about the freebsd-questions mailing list