ntpd not updating time
I had updated my old iMac to Mavericks just fine. I then bought a new (certified refurbished, actually) iMac and migrated everything over from a Time Machine backup.
The new iMac's clock loses several seconds a day. When I unlock the Date & Time system preference, the time then synchronizes to the correct time immediately. But then it just loses time again.
I read this answer and now have a total of 3 time-servers, but it doesn't seem to solve my problem.
In the system.log
file, there are these relevant messages:
Dec 3 22:31:34 iMac.local ntpd[66350]: SYNC state ignoring +0.155735 s
Dec 3 22:31:35 iMac.local ntpd[66350]: ntpd: time set +0.308737 s
Dec 3 22:31:35 iMac.local com.apple.time[158]: Interval maximum value is 946100000 seconds (specified value: 9223372036854775807).
The Interval maximum value
one doesn't look good.
Anybody know how to fix this so that the time stays sync'd?
Update
It took a little while, but the addition of multiple time servers did make it better (not perfect, but better). Now it gains time, but seemingly at a much slower rate.
If the addition of multiple servers (3 in total) had anything to do with making it better, perhaps (?) the addition of yet more servers will make it better still. I now have a total of 5 servers in ntp.conf
. I'll watch it over the next couple of days and see what happens. (Even if this fixes it, this still doesn't answer why all of this is necessary to fix it in the first place. An answer to that would be nice, but I'll settle for it just being fixed at this point.)
BTW: you can set multiple via the System Preferences GUI: just type server names into the field with commas to separate them. This keeps the GUI and the file in sync.
BTW #2: here's the site I got the list of publicly accessible NTP servers from.
Solution 1:
Well, some of these questions (your bullet list including "why 5 servers") are a little difficult to answer, time synchronization is quite the rabbit hole. The old parable about the man with one clock knowing what time it is but the man with two never being sure...
One server is an obvious "truechimer" always because there's nothing to invalidate it. Two servers is the "worst possible configuration" according to the NTP authors since it will never know which one is "more" correct. Once you get to three servers NTP can begin to mark clocks as "falsetickers" based on some internal metrics - those will show up with a status of 'x' when you run ntpq -p
on the system. More information about what the columns and status indicators are for that command is available on ntp.org.
To get back to the issue at hand, a few notes:
placing the line
pool us.pool.ntp.org iburst
in your/etc/ntp.conf
file will automatically add four stratum 2 ntp servers from the ntp pool to your time server list. These use DNS round-robin rotation to spread out load. If you are not in the US, there are other pools you can use.you can't do the pool configuration line from the System Preferences GUI; you could, however, put the following in which would have the same effect:
0.us.pool.ntp.org, 1.us.pool.ntp.org, 2.us.pool.ntp.org, 3.us.pool.ntp.org
.in selecting time servers yourself, you should always ensure you select "stratum 2" or higher servers (best practice online is to only go to stratum 1 servers if you are serving time to dozens of machines locally). you'll also want to check policies in the public time server list before altering the default minpoll/maxpoll with public servers, some administrators do not want you to change from the defaults (this can place a higher load on their public servers). The best approach is to just use the NTP pool servers.
I am also seeing a substantial change in time quality since upgrading to Mavericks. I have just added more servers as you did to see if that solves the issue, but something definitely changed. I have a stratum 1 server on my local network and the clock on my iMac drifts all over the place whereas prior to the Mavericks upgrade it didn't.
Solution 2:
Well, having 5 NTP servers seems to have solved it, so I guess this answer was actually the answer to fix it, but it's an unsatisfying answer because it doesn't answer the following questions:
- Why 5 servers?
- Why are so many needed?
- Why is more than 1 ever needed?
- Is there actually a hardware problem with the clock chip that makes it drift so much thus requiring 5 servers to keep it correct?
Solution 3:
I believe Mavericks did the same thing to my mac mini. After a couple unfruitful calls to apple support (who gave me the standard lame solutions like resetting p-ram), I decided to dig into this myself.
I observed that the ntp demon (ntpd) quits/exits after the first run after system startup. (found by looking at the system logs through the console utility and filtering by "ntp").
I gave apple support a third call to find a more suitable solution than editing config files. I talked to one of their senior tech support staff. He had me do another p-ram reset, but also move the SystemConfiguration folder (found in the Macintosh HD/Library/Preferences folder) to the trash, empty trash and restart. After which, I had to setup my WiFi and computer name again (and later my screen sharing preferences too, as I use VNC for remote screen sharing).
So far (about 23hours later) I can see that ntpd is continuing to run:
12/6/13 10:14:13.648 AM ntpd[125]: ntpd: time set +0.963208 s
12/6/13 10:17:41.244 AM ntpd[125]: FREQ state ignoring +0.048040 s
12/6/13 10:18:51.412 AM ntpd[125]: FREQ state ignoring +0.065328 s
12/6/13 10:20:25.493 AM ntpd[125]: FREQ state ignoring +0.086068 s
12/6/13 10:23:01.588 AM ntpd[125]: FREQ state ignoring +0.121602 s
12/6/13 10:26:33.638 AM ntpd[125]: FREQ state ignoring +0.171160 s
12/6/13 10:31:06.911 AM ntpd[125]: ntpd: time set +0.233468 s
12/6/13 10:53:45.415 AM ntpd[125]: ntpd: time set +0.314875 s
12/6/13 11:58:56.335 AM ntpd[125]: SYNC state ignoring -0.375950 s
12/6/13 12:30:12.744 PM ntpd[125]: ntpd: time set -0.825345 s
12/6/13 1:47:54.647 PM ntpd[125]: SYNC state ignoring -1.119880 s
12/6/13 2:09:34.354 PM ntpd[125]: ntpd: time set -1.432706 s
12/6/13 3:49:25.547 PM ntpd[125]: SYNC state ignoring -1.439366 s
12/6/13 4:16:33.217 PM ntpd[125]: ntpd: time set -1.830211 s
12/6/13 10:33:28.790 PM ntpd[125]: SYNC state ignoring -0.411060 s
12/6/13 11:06:32.793 PM ntpd[125]: ntpd: time set -0.905610 s