[ntp:questions] Re: sntp hangs if network not available

Christopher Nelson cnelson at nycap.rr.com
Fri Dec 2 12:27:19 UTC 2005


Harlan Stenn wrote:
> I think you may benefit from taking a step back and understanding exactly
> what you want to have happen during startup.
>
> If all goes well, sntp will bet a response "quickly".
>
> If not, how long do you want to wait for an answer?
>
> What do you want to do if an answer does not arrive?
>
> It may be that you want to avoid using sntp (or ntpdate) entirely, and start
> ntpd -g as early as possible, using iburst and a usefully persistent drift
> file.  ...

I admit to not being fully familiar and comfortable with NTP (and sntp)
so reexamining what I want and need is prudent.  However, I'm working
in an embedded environment where the time is very useful, but not
strictly required, and resources are scarce.  I really, really don't
want NTP running as a daemon using memory, keeping my time synched.  I
just want an external time reference because I don't have a
battery-backed RTC.

To answer your questions, if if the NTP server doesn't respond in
"network time" (that is, 10s-100s of ms from the LAN), I want to give
up and go on booting up.  If an answer doesn't arrive, I may try to set
the time to something reasonable so that the clock it at least
monotonic, even if it lags reality a fair bit but such heroic efforts
are optional.




More information about the questions mailing list