Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael S. Zick <minimod@morethan.org>
To: buildroot@busybox.net
Subject: [Buildroot] ntpdate takes a long time
Date: Fri, 18 Mar 2011 09:53:19 -0500	[thread overview]
Message-ID: <201103180953.21819.minimod@morethan.org> (raw)
In-Reply-To: <AANLkTi=PdnH5wLpD+F1pmWwf0jNc_baRBGbr70RAtVXT@mail.gmail.com>

On Fri March 18 2011, bruce bushby wrote:
> Hi
> 
> I was wondering if any other people have noticed ntpdate takes a long time?
> 
> My embedded board connects to the internet via ethernet through my home adsl
> and can ping the internet at the same speed my linux desktop can.
> 
> Linux desktop pc running 2.6.32.26-175 (Fedora 12) :
> [root at core ~]# time ntpdate ntp2c.mcc.ac.uk
> 18 Mar 13:56:01 ntpdate[1792]: adjust time server 130.88.200.6 offset
> -0.000064 sec
> 
> real    0m0.213s
> user    0m0.001s
> sys     0m0.001s
> 
> 
> 
> Embedded OS running 2.6.38-rc5 kernel:
> [root at vx-200 ~]# time ntpdate ntp.exnet.com
> 18 Mar 14:01:40 ntpdate[983]: adjust time server 79.135.97.79 offset
> -0.001003 sec
>

Different servers?
That 79.135.97.79 appears to be your dsl gateway address, not ntp.exnet.com

Mike 
> real    0m8.227s
> user    0m0.020s
> sys     0m0.030s
> 
> 
> As you can see, there is a massive difference. I used strace to try and see
> what "ntpdate" is doing....this is the part that concerns me. When it starts
> looping through a series of:
> "ERESTART_RESTARTBLOCK (To be restarted)"
> .... basically it does this for 8 seconds and then finally updates the time.
> Also, my desktop pc does not go into the same loop, nor does it deal with
> "ERESTART_RESTARTBLOCK "
> 
> 
> setpriority(PRIO_PROCESS, 0, -12)       = 0
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> sigreturn()                             = ? (mask now [])
> clock_gettime(CLOCK_REALTIME, {1300457105, 692751159}) = 0
> sendto(3,
> "\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"...,
> 48, 0, {sa_family=AF_INET, sin_port=htons(123),
> sin_addr=inet_addr("130.88.200.6")}, 16) = 48
> poll([{fd=3, events=POLLIN}], 1, 60000) = 1 ([{fd=3, revents=POLLIN}])
> poll([{fd=3, events=POLLIN}], 1, 0)     = 1 ([{fd=3, revents=POLLIN}])
> clock_gettime(CLOCK_REALTIME, {1300457105, 721746679}) = 0
> recvfrom(3,
> "$\2\3\354\0\0\0\260\0\0\2\346\301>\26b\321-\343\340z\221\304\377\321-\345\21\261X#\324"...,
> 76, 0, {sa_family=AF_INET, sin_port=htons(123),
> sin_addr=inet_addr("130.88.200.6")}, [16]) = 48
> poll([{fd=3, events=POLLIN}], 1, 0)     = 0 (Timeout)
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> sigreturn()                             = ? (mask now [])
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> sigreturn()                             = ? (mask now [])
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> sigreturn()                             = ? (mask now [])
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> sigreturn()                             = ? (mask now [])
> poll([{fd=3, events=POLLIN}], 1, 60000) = ? ERESTART_RESTARTBLOCK (To be
> restarted
> 
> 
> 
> The embedded board is connecting via 100Mbit ethernet and can ping the ntp
> server with a reponse time of 22ms and zero packet loss.
> 
> I'm guessing this has nothing to do with "buildroot" and is a kernel/ntpdate
> issue but I wanted to add these findings to the list history.
> 
> 
> Bruce
> 
> 
> 
> 
> 
> 
> 
> I
> 

  reply	other threads:[~2011-03-18 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 14:19 [Buildroot] ntpdate takes a long time bruce bushby
2011-03-18 14:53 ` Michael S. Zick [this message]
2011-03-18 15:34   ` [Buildroot] [Solved] " bruce bushby
2011-03-19  7:29     ` Thomas Petazzoni
2011-03-21 16:19       ` bruce bushby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201103180953.21819.minimod@morethan.org \
    --to=minimod@morethan.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox