Why ntp settle time too long?

0

1

I simply try to set-up NTP to my system. Both server and clients will run on my computer which are linked together with local link. One of them will have the reference clock.

Both the server and Client are linux Ubuntu. I install ntp daemon to both sides. In clients, I enter the ip address of the server to /etc/ntp.conf. Everything works fine.

However, the setting of the time to correct time in client side takes too long time (around 17 minutes). Is it possible to gather correct time just at startup. I write some code that regularly calls "ntpdate " by system call and the problem is solved but there has to be something that allows me to decrease the poll time of the client to 1-2 minutes. There are some settings as maxpoll - minpoll in ntp.conf, but I couldn't manage to understand their function, because with the best configuration (minpoll 4? 16 seconds?) I also cannot see that client side corrects its time before 10 minutes.

In addition, in some cases my client is an embedded system (ARM - IGEP board) and it always opens with an irrelevant date (2-3 years ago). So the time that takes to correct the time should not depend on the time difference also.

fercis

Posted 2013-11-04T09:51:06.423

Reputation: 101

1its not entirely clear what you are asking in terms of getting ntp to resolve 'just at startup'. are you noticing it run at times other than startup and thats causing problems, or is the issue that the time hasn't been synched until the client has been logged in for 17 minutes? – Frank Thomas – 2013-11-04T13:28:11.227

Answers

1

Try setting networkwait=1 in your ntpconfig, if your time synch at boot is not completing correctly. it may also be a good idea to add iburst to the end of your server declaration in your clients ntp.conf.

https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sect-Date_and_Time_Configuration-Command_Line_Configuration-Network_Time_Protocol.html

since you are on ubuntu, which ships clients with ntpupdate by default, and which does attempt a synch on boot, it is likely that your clients network is still down when the request occurs. ubuntu also updates the time daily via chron job.

https://help.ubuntu.com/10.04/serverguide/NTP.html

Minpoll and maxpoll seem to have a lot to do with the internal workings of NTP, but they don't seem like things you want to change without a deep understanding of the implications. I would restore them to default for now, and try the advice above once before manipulating them further.

good luck

Frank Thomas

Posted 2013-11-04T09:51:06.423

Reputation: 29 039