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

Alain alainm at pobox.com
Thu Feb 3 18:07:39 UTC 2005


I took out a few hours for experiments, and I have some usefull 
information: If at boot time I run this commnad:

ntpdate -bu $(cat /etc/ntp.conf | awk '/^ ?server/ { if 
(substr($2,1,3)!="127" && n++<5) printf $2 " " }')

This will use the 5 first seervers in ntp.conf. Time is 2-3s to set the 
clock, but ONLY IF all servers respond. I had one of them not working 
and time went to 8s. Selecting all 5 first servers in my local area 
ntpdate offset went from -97/+105 down to aprox +/-30 ms.

Carefull selection of servers is important, and should be reviewed 
periodicaly, specially the first 5 are working 100% (5 is all I could 
find in Brazil) and pay special attention to the first 5 servers. As an 
example on of my servers went from stratum 2 to 1 and was disturbing 
everything being allways elected...

After that of course *ntpd* should be started. It will use all servers 
in ntp.conf and get a better time. My experiments never got better than 
20-30s for NTPD to start serving.

Please comment on all this...

Thanks
Alain

PS: Extra NOTE (personal opinion): about those servers in big time 
critical operations, IMHO they should have many NTP servers peered with 
each other and all NTP clients using all those servers, ntp down time = 
zero. And of course if a machine is so critical that 3s is too much it 
should be converted into a cluster ;-)


Brad Knowles escreveu:
>     This would certainly be an improvement over using just the one 
> server, yes.
> 
>     However, I would not be inclined to use this as the entire 
> solution.  This will get you started, but you should also have a 
> properly configured ntpd running immediately afterwards.
> 



More information about the questions mailing list