How much system time drift is acceptable?

We have a bunch of machines, at different OS versions. I have scripts that move stuff between them. The system clocks on these machines get out of sync with each other. I have tried the fix to change the config of the ntp machines. This seems to change the problem but not fix it.


Does the amount of variation in times below seem normal? What is normal? Is there some "ntpdate -wakeTheHeckUpAndDoTheRightThing" command I should be putting into a cron job? That would be lame, but if it would work, it would be worth it.


The times below are in different time zone, but I am checking the offset from the hour. How much of this variation should be tolerated?


- ray


ps: output from a checker scipt:


LOCAL: Thu Mar 29 10:33:00 PDT 2012


OK:


a5.com Thu Mar 29 10:33:01 PDT 2012

a6.com Fri Mar 30 01:33:05 CST 2012

a7.com Fri Mar 30 01:33:11 CST 2012


NOT OK:



a12.com Fri Mar 30 01:23:13 CST 2012

a13.com Fri Mar 30 01:25:12 CST 2012

a14.com Fri Mar 30 01:27:41 CST 2012

a15.com Fri Mar 30 01:27:47 ULAT 2012

a16.com Fri Mar 30 01:35:22 CST 2012

a17.com Fri Mar 30 01:35:28 ULAT 2012

a18.com Fri Mar 30 01:35:30 ULAT 2012

a19.com Thu Mar 29 20:35:41 EEST 2012

a20.com Thu Mar 29 20:35:44 EEST 2012

a21.com Thu Mar 29 20:35:48 EEST 2012

a28.com Thu Mar 29 20:36:10 EEST 2012

a29.com Thu Mar 29 10:36:17 PDT 2012

a30.com Thu Mar 29 10:36:14 PDT 2012

a31.com Thu Mar 29 10:36:14 PDT 2012

a34.com Thu Mar 29 10:36:17 PDT 2012

a35.com Fri Mar 30 00:36:32 ICT 2012

a36.com Fri Mar 30 00:36:21 ICT 2012

a37.com Fri Mar 30 00:36:29 ICT 2012

a38.com Thu Mar 29 10:40:32 PDT 2012

a39.com Thu Mar 29 10:44:47 PDT 2012

Posted on Mar 29, 2012 10:53 AM

Reply
8 replies

Mar 29, 2012 12:54 PM in response to kray2

Well, historically speaking, Apple internal clocks have always been a bit inaccurate, but ±3 minutes seems excessive unless the machines have been running without synchronization for a couple of years. Why don't you set the time automatically from Apple's server? (there's an option for that in the date/time preference panel) That should keep them in line without extra effort.

Mar 29, 2012 1:04 PM in response to kray2

This reeks of an ntp server configuration error, some sort of network error, or of a bogus ntp server value.


Launch Terminal.app and issue the command


ntpdc -c peers


To see if the ntp clients are synchronized with the ntp server(s). (And how far off.)


Non-zero values for delay, offset and disp mean that the ntp client is locked. Zero values mean it's not locked.


General ntp information, as well as links to ntp debugging information, are available via the ntp.org site and the www.eecis.udel.edu site.


And FWIW, I would avoid getting any sntp servers into the mix, as can happen with some time servers.

Mar 30, 2012 6:08 AM in response to kray2

I am not certain what you have done; what you're reporting. That the time drifts and that you are using ARD has been stated earlier. That the solution does not scale? Which solution? Invoking ntpdate certainly doesn't scale, of course, and the ntpdc command I showed doesn't reset the clocks; it's a query to learn the status on each client.


Put another way, what I posted was not a solution. It was a check to see if you have NTP services running on the OS X systems, and whether the NTP clients on those OS X systems were locked onto and with reasonable offsets from the NTP server.


Based on your comment (and what I can infer from this sequence), you have an NTP client running, and NTP is locked to the time servers (with a reasonable offset from the NTP server(s), and non-zero settings in the ntpdc output), and you are (still) getting clock drift?


If you are (still) getting clock drift, then your NTP servers might well be suspect.


Are you providing your own time-base? What time servers are you using?


Are your systems getting different offsets and jitter from the NTP servers?

Mar 30, 2012 9:18 PM in response to MrHoffman

We had been managing the clocks on these systems by going to System Preferences, going to the Date & Time preference, and checking the "Set time and date automatically" checkbox. The time on these systems would drift. Then we would use ARD to log in, go the System Preferences. Going to the 'Date & Time' would make the system say "Oh yeah..." and it would be synchronized with time.asia.apple.com or whichever it was. The checkbox had been checked. It just seemed to be getting ignored.


Logging in manually like this does not scale. (Does it not seem odd that when you reply to a specific comment here, it is not very obvious which one you just replied to? Hm. In this case, I replied to twtwtw and not you.)


I ran "ntpdc -c peers" and to tell the truth. I am not sure of what to make of the results.


Host: a1.com remote local st poll reach delay offset disp ======================================================================= =sng-ntp-ext.asi 211.157.25.168 2 131072 377 0.07983 600.88923 1.89697 Host: a2.com remote local st poll reach delay offset disp ======================================================================= *time.asia.apple 211.157.25.167 2 1024 377 0.07568 -0.004070 0.01483 Host: a3.com remote local st poll reach delay offset disp ======================================================================= =sng-ntp-ext.asi 211.157.21.117 2 131072 377 0.08327 488.17758 1.89696


So what is this about? These three machines are right next to each other in one of our China data centers.


So, how did time.asia.apple.com get switched out for these other hosts? We did not change the settings....

Mar 30, 2012 11:29 PM in response to kray2

Well, without being able to offer a solution, I can tell you that the sng-ntp-ext.asi server appears to be the problem. If I'm reading it correctly (see http://www.eecis.udel.edu/~mills/ntp/html/ntpdc.html), the = at the beginning means that the server is not synchronized but is "being polled in client mode" (the * at the start of the time.asia.apple server is a synchronized connection), and the numbers are just ugly: a polling time that is something like 36 hours and might be code for infinity, and an offset error of 488 second or roughly 8 minutes. The question is why those machines are not connecting to the apple server like they should. is there anything relating to ntp showing up as an error in console?

Mar 31, 2012 7:59 AM in response to twtwtw

Two of the three NTP servers referenced (the non-Apple servers) are not locked, and are apparently returning skewed times.


There are two ways to specify the NTP time servers with OS X Server. One is via the Server Admin GUI (Server Admin > select server > Settings > Time and Date > Date and Time > set the NTP server, and the other (and less common, less desirable) uses the /etc/ntp.conf file.


With OS X client time-keeping, System Preferences > Time and Date > Date and Time selects the server, or the /etc/ntp.conf file.


Modifying the ntp.conf file directly may (will?) get overwritten.


It appears that the two non-Apple time servers "have issues". Switch to the Apple servers.


Some related reading.


How these server acquired what are probably misconfigured NTP settings is something you'll want to or need to investigate.


There are also DNS errors with those IP addresses, too; the reverse translations are coming back with DNS that probably isn't what would be intended with a server.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How much system time drift is acceptable?

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