<div><br></div><div><br></div><div>Hi</div><div><br></div><div>Apologies Michael....I think it got mixed up and pasted the results while still running over "ppp0"</div><div><br></div><div>It appears the issue is caused by "ntp", I reverted my ntp package version to "4.2.6p1" and now it works fine.</div>
<div><br></div><div>The results below show the same commands from:</div><div>Linux Desktop</div><div>Embedded running ntp-4.2.6p3 (broken)</div><div>Embedded running ntp-4.2.6p1 (working)</div><div><br></div><div><br></div>
<div>I used an IP address to ensure dns was not involved and ran a single ping to show network response for all three sets of results.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>From my linux Desktop:</div>
<div>[root@core ~]#</div><div>[root@core ~]# ntpdate -v</div><div>18 Mar 15:25:35 ntpdate[3681]: ntpdate 4.2.4p8@1.1612-o Wed Dec  9 11:49:12 UTC 2009 (1)</div><div>18 Mar 15:25:35 ntpdate[3681]: no servers can be used, exiting</div>
<div>[root@core ~]#</div><div>[root@core ~]# ping -c 1 130.88.200.6</div><div>PING 130.88.200.6 (130.88.200.6) 56(84) bytes of data.</div><div>64 bytes from <a href="http://130.88.200.6">130.88.200.6</a>: icmp_seq=1 ttl=52 time=22.0 ms</div>
<div><br></div><div>--- 130.88.200.6 ping statistics ---</div><div>1 packets transmitted, 1 received, 0% packet loss, time 22ms</div><div>rtt min/avg/max/mdev = 22.019/22.019/22.019/0.000 ms</div><div>[root@core ~]#</div>
<div>[root@core ~]# time ntpdate 130.88.200.6</div><div>18 Mar 15:25:55 ntpdate[3684]: adjust time server 130.88.200.6 offset -0.000153 sec</div><div><br></div><div>real    0m0.189s</div><div>user    0m0.000s</div><div>sys     0m0.003s</div>
<div>[root@core ~]#</div><div><br></div><div><br></div><div><br></div><div>Embedded using ntp-4.2.6p3:</div><div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]# ntpdate -v</div><div>18 Mar 15:28:08 ntpdate[989]: ntpdate 4.2.6p3@1.2290 Fri Mar 18 15:23:46 UTC 2011 (1)</div>
<div>18 Mar 15:28:08 ntpdate[989]: no servers can be used, exiting</div><div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]# ping -c 1 130.88.200.6</div><div>PING 130.88.200.6 (130.88.200.6): 56 data bytes</div>
<div>64 bytes from <a href="http://130.88.200.6">130.88.200.6</a>: seq=0 ttl=52 time=22.826 ms</div><div><br></div><div>--- 130.88.200.6 ping statistics ---</div><div>1 packets transmitted, 1 packets received, 0% packet loss</div>
<div>round-trip min/avg/max = 22.826/22.826/22.826 ms</div><div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]# time ntpdate 130.88.200.6</div><div>18 Mar 15:28:35 ntpdate[993]: adjust time server 130.88.200.6 offset -0.000011 sec</div>
<div><br></div><div>real    0m8.195s</div><div>user    0m0.000s</div><div>sys     0m0.030s</div><div>[root@vx-200 ~]#</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Embedded using ntp 4.2.6p1:</div>
<div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]# ntpdate -v</div><div>18 Mar 15:18:41 ntpdate[989]: ntpdate 4.2.6p1@1.2158 Fri Mar 18 14:41:09 UTC 2011 (1)</div><div>18 Mar 15:18:41 ntpdate[989]: no servers can be used, exiting</div>
<div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]#</div><div>[root@vx-200 ~]# ping -c 1 130.88.200.6</div><div>PING 130.88.200.6 (130.88.200.6): 56 data bytes</div><div>64 bytes from <a href="http://130.88.200.6">130.88.200.6</a>: seq=0 ttl=52 time=22.893 ms</div>
<div><br></div><div>--- 130.88.200.6 ping statistics ---</div><div>1 packets transmitted, 1 packets received, 0% packet loss</div><div>round-trip min/avg/max = 22.893/22.893/22.893 ms</div><div>[root@vx-200 ~]#</div><div>
[root@vx-200 ~]# time ntpdate 130.88.200.6</div><div>18 Mar 15:19:05 ntpdate[993]: adjust time server 130.88.200.6 offset -0.004568 sec</div><div><br></div><div>real    0m0.285s</div><div>user    0m0.000s</div><div>sys     0m0.040s</div>
<div>[root@vx-200 ~]#</div><div><br></div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 2:53 PM, Michael S. Zick <span dir="ltr"><<a href="mailto:minimod@morethan.org">minimod@morethan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri March 18 2011, bruce bushby wrote:<br>
> Hi<br>
><br>
> I was wondering if any other people have noticed ntpdate takes a long time?<br>
><br>
> My embedded board connects to the internet via ethernet through my home adsl<br>
> and can ping the internet at the same speed my linux desktop can.<br>
><br>
> Linux desktop pc running 2.6.32.26-175 (Fedora 12) :<br>
> [root@core ~]# time ntpdate <a href="http://ntp2c.mcc.ac.uk" target="_blank">ntp2c.mcc.ac.uk</a><br>
> 18 Mar 13:56:01 ntpdate[1792]: adjust time server 130.88.200.6 offset<br>
> -0.000064 sec<br>
><br>
> real    0m0.213s<br>
> user    0m0.001s<br>
> sys     0m0.001s<br>
><br>
><br>
><br>
> Embedded OS running 2.6.38-rc5 kernel:<br>
> [root@vx-200 ~]# time ntpdate <a href="http://ntp.exnet.com" target="_blank">ntp.exnet.com</a><br>
> 18 Mar 14:01:40 ntpdate[983]: adjust time server 79.135.97.79 offset<br>
> -0.001003 sec<br>
><br>
<br>
</div>Different servers?<br>
That 79.135.97.79 appears to be your dsl gateway address, not <a href="http://ntp.exnet.com" target="_blank">ntp.exnet.com</a><br>
<br>
Mike<br>
<div><div></div><div class="h5">> real    0m8.227s<br>
> user    0m0.020s<br>
> sys     0m0.030s<br>
><br>
><br>
> As you can see, there is a massive difference. I used strace to try and see<br>
> what "ntpdate" is doing....this is the part that concerns me. When it starts<br>
> looping through a series of:<br>
> "ERESTART_RESTARTBLOCK (To be restarted)"<br>
> .... basically it does this for 8 seconds and then finally updates the time.<br>
> Also, my desktop pc does not go into the same loop, nor does it deal with<br>
> "ERESTART_RESTARTBLOCK "<br>
><br>
><br>
> setpriority(PRIO_PROCESS, 0, -12)       = 0<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted)<br>
> --- SIGALRM (Alarm clock) @ 0 (0) ---<br>
> sigreturn()                             = ? (mask now [])<br>
> clock_gettime(CLOCK_REALTIME, {1300457105, 692751159}) = 0<br>
> sendto(3,<br>
> "\343\0\3\372\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,<br>
> 48, 0, {sa_family=AF_INET, sin_port=htons(123),<br>
> sin_addr=inet_addr("130.88.200.6")}, 16) = 48<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = 1 ([{fd=3, revents=POLLIN}])<br>
> poll([{fd=3, events=POLLIN}], 1, 0)     = 1 ([{fd=3, revents=POLLIN}])<br>
> clock_gettime(CLOCK_REALTIME, {1300457105, 721746679}) = 0<br>
> recvfrom(3,<br>
> "$\2\3\354\0\0\0\260\0\0\2\346\301>\26b\321-\343\340z\221\304\377\321-\345\21\261X#\324"...,<br>
> 76, 0, {sa_family=AF_INET, sin_port=htons(123),<br>
> sin_addr=inet_addr("130.88.200.6")}, [16]) = 48<br>
> poll([{fd=3, events=POLLIN}], 1, 0)     = 0 (Timeout)<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted)<br>
> --- SIGALRM (Alarm clock) @ 0 (0) ---<br>
> sigreturn()                             = ? (mask now [])<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted)<br>
> --- SIGALRM (Alarm clock) @ 0 (0) ---<br>
> sigreturn()                             = ? (mask now [])<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted)<br>
> --- SIGALRM (Alarm clock) @ 0 (0) ---<br>
> sigreturn()                             = ? (mask now [])<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted)<br>
> --- SIGALRM (Alarm clock) @ 0 (0) ---<br>
> sigreturn()                             = ? (mask now [])<br>
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be<br>
> restarted<br>
><br>
><br>
><br>
> The embedded board is connecting via 100Mbit ethernet and can ping the ntp<br>
> server with a reponse time of 22ms and zero packet loss.<br>
><br>
> I'm guessing this has nothing to do with "buildroot" and is a kernel/ntpdate<br>
> issue but I wanted to add these findings to the list history.<br>
><br>
><br>
> Bruce<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> I<br>
><br>
<br>
<br>
</div></div>_______________________________________________<br>
buildroot mailing list<br>
<a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
<a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
</blockquote></div><br>