/var/db/ntp.drift is missing - Ntpd does not create a driftfile

I cannot get ntp to create and maintain a driftfile.

Although I will see one show up occasionally, it never gets updated. If I delete it, a new one may show up the next time ntp is run (the existing one that is running will never create a new one), or it might not.

Help?

Mac iBook G4, Mac OS X (10.5.5)

Posted on Oct 15, 2008 2:53 AM

Reply
2 replies

Oct 15, 2008 3:09 AM in response to keybounce

Here is some interesting info:

+
The frequency file, usually called ntp.drift, contains the latest estimate of clock frequency. If this file does not exist when ntpd is started, it enters a special mode designed to measure the particular frequency directly. The measurement takes 15 minutes, after which the frequency is set and ntpd resumes normal mode where the time and frequency are continuously adjusted.
+

Are you waiting long enough for the new file to be created? Also this article discusses other options, hope you find it useful.


User uploaded file
-mj

Oct 15, 2008 9:34 AM in response to macjack

It also says,

"The frequency file is updated at intervals of an hour or more depending on the measured clock stability."

I've never seen the file updated once it's made, and sometimes it doesn't get made if it's not there to begin with.

Also, I've noticed two bugs. One is Apple related -- if the machine goes to sleep, on wake up the clock will be way off, and need a stepping. However, ntpd wants to assume that the entire drift change occured during the last polling interval (generally around 64-4096 seconds), rather than the total time the machine was asleep. Ntpd isn't restarted when the system wakes up and the clock is known to be in error.

This has been seen since 10.4.3, and is still present in 10.5.5; it causes two clock steps (at least) on wakeup -- one to correct the clock, and give ntpd an inaccurate, high drift value; the second once it has corrected the drift but restepped the clock again.

In 10.4, ntp was keeping the drift file up to date. (In fairness, I don't recall if I was using the apple ntp, or if I had compiled the tarball. I do know that I had gotten both "burst" and "iburst" to work, and they do NOT both work in 10.5.5. "Burst" definitely is a no-op, and I'm not sure that "iburst" works or not.)

The second bug is definitely an ntpd bug, but I don't know where to report it. If the "clock out of range" time is more than 900 seconds, the next update automatically sets the clock. Even if the current time interval is more than 900 (eg, 1024 seconds), which means that if the clock is stable enough to get to 1024, then any error automatically alters the clock, without any "Hey, lets wait and see if we get a second sample that's valid".

Oddly, that bug has caused me problems in two cases: Dialup (file downloads saturate the line), and wireless (intermittent connections make nice random, occasional delays ...)

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.

/var/db/ntp.drift is missing - Ntpd does not create a driftfile

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