[ntp:questions] ntpd, boot time, and hot plugging

Alain alainm at pobox.com
Wed Feb 2 18:40:15 UTC 2005



Steve Kostecke escreveu:
> On 2005-02-02, Brad Knowles <brad at stop.mail-abuse.org> wrote:
> 
>>At 3:09 PM -0200 2005-02-02, Alain wrote:
>>
>>
>>> In the /etc/init.d/ntpd I added just after "start)"
>>>   ntpdate -bu $(cat /etc/ntp.conf | awk '/^server/ { print $2; exit}')
>>>
>>> This forces a fast updade from the same server list as in ntp.conf,
>>> usualy only the internal server(s). Then I don bother to wait NTP to
>>> sync because I know that my time is ok.
>>
>>	Please note that ntpdate is being deprecated for a reason.  It 
>>does *not* give you good time sync.  Moreover, it does not *keep* the 
>>server in good time sync.
> 
> 
> A better way to handle the initial clock setting is to start ntpd with
> the '-g' option.
> 
> This option allows ntpd to ignore its 1000s (~16m) panic threshold when
> it sets the time at startup. The time is slewed if the offset is less
> than the step threshold, which is 128 ms by default, and stepped if
> above the threshold. 
> 
> If you use 'iburst' on your server lines ntpd will usually sync in
> ~15-30 seconds after startup.

What if the machine just has a dead battery? It will boot with 1980 or 
2000. On Desktops boxes this does happen a lot.

To Brad, 2 messages above:
1) I am not saying of using ntpdate to *keep* a good sync but just to 
guarantee a cold start, maybe just a little better then my whrist watch, 
specially if I am not there.
2) When you say "It does *not* give you good time sync" how bad is that? 
does it test all the servers in the list using the NTP algorithm to 
eliminate the bad ones? How much off can it get?

I am considering this scenario: Small business, time used for file 
timestamp, email, IDS and lunch-time (human general use). I understand 
that NTP is a big overkill here, but 1) it works 2) it allways works 3) 
there is nothing else that really works.

I understand that NTP was designed for much more than that, but this is 
important too and I would like to know how much I can get, not to get 
the best out of it. First goal was: 1) 1 second precision, 2) 100% human 
free operation, this was met a long time ago :))

Please forgive me everybody, as this is not the first time I bring this 
subject back, but I really want to understand this.

Thanks for you patience,
Alain



More information about the questions mailing list