[ntp:questions] Re: ntp client over satellite and no CMOS battery
Richard B. Gilbert
rgilbert88 at comcast.net
Wed Oct 5 04:36:33 UTC 2005
Bob Beers wrote:
>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.
>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
>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 172.16.87.11 <http://172.16.87.11> iburst
>( where 172.16.87.11 <http://172.16.87.11> is my linux ntpd server on the
>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
>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
Have you considered installing a battery? Typically, these are lithium
"coin" cells with a lifetime comparable to that of the computer; i.e.
three to five years. Virtually all PCs are so equipped and most other
computers have similar provisions. The batteries themselves cost three
or four dollars US at your local supermarket.
If that's not feasible, how about testing network connectivity with
"ping" and delay the startup of ntpd until the network is up.
More information about the questions