Another 11.1-RELEASE install minor annoyance (ntpd)

Arthur Chance freebsd at qeng-ho.org
Thu Oct 12 12:18:44 UTC 2017


On 12/10/2017 11:58, Matthew Seaman wrote:
> On 12/10/2017 06:53, Kent Kuriyama wrote:
>> What is happening is that your system clock is so far off that ntpd starts
>> up and then shutdown because the time delta is too great.
>>
>> I just enable ntpdate.  In /etc/rc.conf I have the lines:
>>
>> ntpdate_enable="YES"
>> ntpdate_flags="-b"     # Causes ntpdate to step the time regardless of delta
>>
>> Reboot the system, this should fix your problem.
>>
>> Kent
>>
>> On Wed, Oct 11, 2017 at 7:32 PM, Ronald F. Guilmette <rfg at tristatelogic.com>
>> wrote:
>>
>>>
>>> I dunno what went wrong here.  During my fresh install of 11.1-RELEASE
>>> I explicity selected that I wanted ntpd to run, and sure enough, in my
>>> /etc/rc.conf file I see the line:
>>>
>>> ntpd_enable="YES"
>>>
>>> but "ps -ax | fgrep ntp" shows nothing running, and the time on this
>>> system is way way WAY off.
>>>
>>> What did I do wrong?
>>>
>>> Is this another case where I have to poke an appropriate hole in my
>>> Linksys E4200 router config, ya know, to make NTP work?
> 
> Nowadays, use of ntdate(8) is discouraged.  The upstream has been
> threatening to delete it from the distribution for years.

Hasn't this been the case for about a decade now, and yet it still works?

> Instead, just give ntpd(8) the flags that allow it to reset the clock by
> an arbitrary amount on startup.  In /etc/rc.conf thats:
> 
> ntpd_enable="YES"
> ntpd_sync_on_start="YES"

>From memory (so not necessarily accurate), ntpd -g can do a large
adjustment some time after the ntpd rc script has returned. If you use
dovecot for IMAP it didn't use to like negative time steps and would
simply die when that happened. I believe it's not quite as draconian
these days, but I prefer it if the system clock is set accurately before
the rc script returns, rather than some random time later. Using ntpdate
first means the clock will only be slewed, not stepped.

-- 
An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).


More information about the freebsd-questions mailing list