[ntp:questions] ntpd -q and driftfile
albertson.chris at gmail.com
Thu Mar 24 17:04:32 UTC 2011
On Thu, Mar 24, 2011 at 1:45 AM, prashant sherin <pvsnmp at yahoo.com> wrote:
> Hi All,
> Thanks for the discussion and suggestions.
> I accept there are disadvantages in syncing the local clock using ntpd
> My only question was whether the drift file will be created/used/
> updated by ntpd when it is used with -q option.
The best clue is from the man page:
"...With the -q option ntpd operates as in continous mode, but
exits just after setting the clock for the first time with the
configured servers. ..."
The point of having a drift file is just to give ntpd a hint when it
starts up so that it can sync faster. So by the above I'd say that
ntpd does the same thing on startup with and without the -q option.
As for setting the drift file I don't know if that is even meaningful
for a short run. Typically you want to run for hours or days to get an
accurate drift. By the above quote I'm pretty sure ntpd must use
the file but if it sets the file, well you could determine yourself
by looking at the file's time stamp to see the last time of
If ntpd is not allowed to run long enough to set the drift file then
after some time (weeks, months) it will hardly matter if ntp reads the
drift file as the data inside will be outdated.
Redondo Beach, California
More information about the questions