[ntp:questions] Re: ntp client over satellite and no CMOS battery

Brian T. Brunner brian.t.brunner at gai-tronics.com
Wed Oct 5 18:34:08 UTC 2005

calldelay does not look like what you want... it just sticks a hard wait between the first two attempts to get the time from the server, regardless of whether the first succeeded, regardless of whether the rest of the iburst will do what you want iburst to do.

make the ntpd starter script wait for a minute after starting ntpd, and check the time.  If the year is still 2000, loop back up to restart ntpd.
have the application wait on the year changing from 2000 to something else before starting the real work.

missing from the ntpd design(?): some system-readable TimeIsGood flag set by ntpd for applications to use where they must have trustable time.
alt: TimeStateIs flag with values of LOST (no net, no idea what time it is), SEEKING (found a source, getting time), and SYNC (time is good)
alt: SEEKING_n for n ranging 1 to the "minimum acceptable set size" for your site; SYNC means the highest minimum has been met.  This allows different applications to decide when is the time sufficiently good for that application.

just my thoughts.

Brian Brunner
brian.t.brunner at gai-tronics.com

>>> Bob Beers <bob.beers at gmail.com> 10/04/05 04:18PM >>>
Hello again all,

While it was an interesting excursion, I wonder if I could bring
this thread back around to the original topic?

There have been a few other threads recently which touch a bit on
the same subject matter and I have learned a bit from them.

sync immediately
ntpd for dummies
ntpd and hwclock

I still have not completely solved my original problem,
which I will restate now:

A linux unit (basically an ntpd client) without a hwclock battery
lives on the remote side of a satellite connection. Every time
it comes alive from power cycle, the hwclock sets the system clock
to 2000-Jan-01.

Under ideal circumstances, the network is available before the client
starts ntpd -g -N, and all is well; the system clock is set to
current time very quickly. I have a 3 line ntp.conf on the client:

server <> iburst
driftfile /etc/ntp.drift
logfile /var/log/ntp.log

( where <> is my linux ntpd server on the
internet side
of the satellite using four pool.ntp.org <http://pool.ntp.org> servers, and
to only serve time to my clients )

However, sometimes, the network link does not become available until
after ntpd has been started. If the initial iburst to the server
doesn't get any reponse, and then the network does become available,
it takes several minutes vs. a few seconds to get the clock set.

Q1: Can I modify that behavior?

If not, I have in mind to run a cronjob which tests network connectivity
to the ntpd server and (re)starts ntpd, to get the quick clock adjust once
the network is available. I would still need to detect when the state
was "good", and then could set my hwclock manually (optional) and cancel
the cronjob.

Better ideas most welcomed.

This is important (to me) because I have an app to run on the client
which uses timestamps, and I want to delay starting the app until after
the system clock is set, but, of course, as quickly as possible. And
I don't want to delay the rest of the boot process, just the one app.


questions mailing list
questions at lists.ntp.isc.org 

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.

www.hubbell.com - Hubbell Incorporated

More information about the questions mailing list