2 Replies
      Latest reply on Jan 11, 2018 8:26 PM by ccm2048
      granada29 Level 1 Level 1 (0 points)

        It looks as though the ntpd NTP daemon has been retired from time-keeping duties in 10.13 and replaced by timed.

         

        I had never heard of timed before, but I gather from the man page that it has been in use on iOS devices since 1OS 10.5

         

        From what shows up in the logs and by observing the network activity, timed appears to be a simple sntp client - i.e. it polls the NTP periodically (15 minutes) and uses the settimeofday() system call to set the sytem clock. I assume it has some cleverness to avoid stepping the clock backwards but there is no way to tell.

         

        This explains why I no longer see ntpd in the list of active processes.

         

        There is a bug, introduced in 10.13, with the system call adjtime(), used by ntpd to slew the system clock without making time go backwards. Unfortunately, the adjtime() call is totally broken in 10.13, yielding huge errors if you attempt to slew the clock by a negative amount. I  filed a bug report 6 weeks ago, including a test case that demonstrates the problem, but since it appears the new (to macOS) timed is not affected by the bug, it seems to have attracted very little interest.

         

        chronyd is replacement software for ntpd (and now timed) that has many advantages over either of those daemons and like ntpd, makes use of adjtime() to slew the clock. Until this adjtime() bug is fixed chronyd will produce terrible results and attempt to slew the clock by a huge amount. A new release of chronyd will fix the problem but earlier versions will fail spectacularly.

         

        It sure would be nice if someone from Apple reads this and finds out what is happening with bug #32808867