You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ntp time drift mavericks

Can not keep time sync'd. I rely on time stamping and can see time drift from being seconds to being minutes behind. When I run ntpq -np poll interval shows 64 but "when" maybe several thousand since it polled last. I have also tried different time servers. This only started with the upgrade to Mavericks.

MacBook Air, OS X Mavericks (10.9)

Posted on Nov 26, 2013 10:41 AM

Reply
53 replies

Nov 27, 2014 1:12 AM in response to Jack840

This thread has already described much of the mystery surrounding the problem of the ntpd daemon on mavericks. A quick recap:


1. The Mavericks version of ntpd does not adjust the system clock directly, nor does it obey the polling interval directives.

2. ntpd is configured by /usr/libexec/ntpd-wrapper to create and update the file /var/db/ntp.drift. (/usr/libexec/ntpd-wrapper is itself invoked by launchd, via the /System/Library/LaunchDaemons/org.ntp.ntpd.plist file.)

3. The pacemaker daemon is designed to read /var/db/ntp.drift and invoke adjtime(2) to adjust the system clock.

4. To save energy, pacemaker will only run if /var/db/ntp.drift has been updated within one minute of the current time.

5. Though I have not completely verified the effect, I believe that because ntp.drift is a very small file, it tends to remain in the file system cache for long periods of time (even when opened and closed for each write). The file modify date is only changed when the cached data is flushed to disk, but the cache consistency code will ensure that any reads of the file return the proper, updated contents. The unfortunate side-effect is that pacemaker won't be triggered when necessary.

6. This problem may be fixed in Yosemite, thought I don't have one of those system running currently and so have not verified that.

7. As others have noted, if you are not concerned about energy use, you can either compile ntpd from the standard ntp release and use that, or just copy ntpd from a 10.8 system (caveat: I haven't tried that yet).

8. You can avoid simultaneous operation of pacemaker and ntpd by altering /usr/libexec/ntpd-wrapper to have ntpd write its drift file to any location other than /var/db/ntp.drift.

Jun 30, 2015 12:21 PM in response to MMGB

Still seeing this issue in Yosemite 10.10.3. When I go to Date & Time system preference, I can watch my clock in the menubar jump, for example, 7 seconds backwards. Clearly the time hasn't been synced in quite a while. This is an infuriating bug. Does anyone know if this was reported to Apple via their Radar bug reporting system? If so, what's the Radar number?

ntp time drift mavericks

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.