[ntp:questions] Re: sntp hangs if network not available
anil_gunturu at yahoo.com
Fri Dec 2 13:07:42 UTC 2005
Waiting forever until ^C was because of what I described in earlier mail. Yeap running ntpd for an embedded application is an overkill. Right now there is no way in sntp to timeout in sub-second intervals. sntp uses "alram" call to signal timeout and the granuality of this call is in seconds. We need to change the code a bit to meet your requirements.
Christopher Nelson <cnelson at nycap.rr.com> wrote:
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
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
questions mailing list
questions at lists.ntp.isc.org
Single? There's someone we'd like you to meet.
Lots of someones, actually. Try Yahoo! Personals
More information about the questions