[ntp:questions] Getting SNTP to accept large corrections

Christopher Nelson cnelson at nycap.rr.com
Wed Jan 16 20:56:38 UTC 2008

On Jan 16, 3:44 pm, "Richard B. Gilbert" <rgilber... at comcast.net>
> Christopher Nelson wrote:
> > I have a system without a battery-backed clock and I want to get some
> > semblance of the right time at boot up using sntp.  Since the time
> > starts out decades off, I need to accept a large correction on my
> > initial request.  I'm using sntp from NTP 4.2.4p0 and I don't seem to
> > be able to convince it to just take whatever time is provided.  I
> > ended up patching it to have a prompt threshold of INT_MAX but I'd
> > rather have a command line option that said, "Just this once, trust
> > me."  Is that expectation way off?  Is anyone else using sntp to get
> > an initial clock setting when the default time is way off?  How do you
> > cope with that?
> Have you tried starting ntpd with the -g option?  This is supposed to
> tell ntp to set the clock to a reasonable approximation of the correct
> time at startup.  It doesn't care if you're off by ten seconds or ten years!

How does it know what the correct time is so that it can determine a
reasonable approximation?  Are you saying that it should set the time,
regardless of the delta?

> I don't know if there is an option to set the clock and exit!  I don't
> use sntp but there might be an option to allow setting the clock.

I'd have to review the options.  I know when I last played with it I
couldn't find one to do that.

More information about the questions mailing list