Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Busybox and ntp

2,840 views
Skip to first unread message

jam725

unread,
Dec 16, 2009, 2:26:01 PM12/16/09
to
Is there anyone who can help with untangling some ntp issues in
busybox? I have an Atmel STK1000 dev kit (AVR32, AP7000 ARM 7
processor) and want to turn it into an NTP server. I'm running
busybox and have added ntp utilities through buildroot, but don't know
what I need to do to synchronize this board to external servers. I
have followed the advice from this walk-through:
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server

but have hit some snags where certain commands are not supported in
busybox (service start/stop/reset, chkconfig). At boot ntpd looks to
read from somewhere:

Running ntpdate: 16 Dec 17:39:43 ntpdate[411]: step time server
155.101.3.114 offset 1260988767.511027 sec
done

but issuing an ntpdate command returns:

16 Dec 18:22:01 ntpdate[444]: no servers can be used, exiting

what can I do to test that this is working? 'pgrep ntpd' returns only
one process number where the above link makes it sound I should be
seeing several.

I've posted at AVRFreaks, but they've been slow to respond. I was
wondering whether this would be a more appropriate place to post.

Thanks.


Richard B. Gilbert

unread,
Dec 16, 2009, 2:59:24 PM12/16/09
to
jam725 wrote:
> Is there anyone who can help with untangling some ntp issues in
> busybox? I have an Atmel STK1000 dev kit (AVR32, AP7000 ARM 7
> processor) and want to turn it into an NTP server. I'm running
> busybox and have added ntp utilities through buildroot, but don't know
> what I need to do to synchronize this board to external servers. I
> have followed the advice from this walk-through:
> http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch24_:_The_NTP_Server
>
> but have hit some snags where certain commands are not supported in
> busybox (service start/stop/reset, chkconfig). At boot ntpd looks to
> read from somewhere:
>
It wants a file called ntp.conf. Since I have never seen or heard of a
"busybox" I probably can't help you much with where to put the file. On
a Unix box it defaults to /etc.

The ntp.conf file typically contains from four to seven server
statements which look like:

server 192.168.1.23
server 10.1.1.13
etc.

You may use the names instead of the numeric IP addresses.

> Running ntpdate: 16 Dec 17:39:43 ntpdate[411]: step time server
> 155.101.3.114 offset 1260988767.511027 sec
> done
>
> but issuing an ntpdate command returns:
>
> 16 Dec 18:22:01 ntpdate[444]: no servers can be used, exiting
>

An ntpdate command requires the name or IP address of a server.

> what can I do to test that this is working? 'pgrep ntpd' returns only
> one process number where the above link makes it sound I should be
> seeing several.

No! There should be one and only one ntpd process!
<snip>

Uwe Klein

unread,
Dec 16, 2009, 3:16:28 PM12/16/09
to
Richard B. Gilbert wrote:
> It wants a file called ntp.conf. Since I have never seen or heard of a
> "busybox" I probably can't help you much with where to put the file. On
> a Unix box it defaults to /etc.

busybox is a statically linked multipurpose single binary executable.
Swiss army knife for small/embedded systems.
behaves dependent on as what it was called, i.e. what is in *argv[0]

uwe

Steve Kostecke

unread,
Dec 16, 2009, 4:40:25 PM12/16/09
to
On 2009-12-16, jam725 <jamo...@gmail.com> wrote:

> but have hit some snags where certain commands are not supported in
> busybox (service start/stop/reset, chkconfig).

You don't need those commands. Just run the init scripts directly.

> At boot ntpd looks to
> read from somewhere:
>
> Running ntpdate: 16 Dec 17:39:43 ntpdate[411]: step time server
> 155.101.3.114 offset 1260988767.511027 sec
> done

ntpd != ndpdate

> but issuing an ntpdate command returns:
>
> 16 Dec 18:22:01 ntpdate[444]: no servers can be used, exiting

ntpdate needs at least one time server name on the command-line.

> what can I do to test that this is working? 'pgrep ntpd' returns only
> one process number where the above link makes it sound I should be
> seeing several.

1) ps ax | grep ntpd may show something like this:

3458 pts/2 R+ 0:00 grep ntpd
26773 ? Ss 0:02 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 103:104 -g -N

2) try 'ntpq -p' and 'ntpq -crv'

--
Steve Kostecke <kost...@ntp.org>
NTP Public Services Project - http://support.ntp.org/

Hal Murray

unread,
Dec 18, 2009, 3:04:54 AM12/18/09
to

>but have hit some snags where certain commands are not supported in
>busybox (service start/stop/reset, chkconfig).

service is just a script/program to run one of the start/stop
scritps. It may be a redhat/fedora/linux thing. google will
find the man page.

chkconfig is a utility to setup the links for starting
and stopping services. Again, there is a man page.

If you aren't familiar with how servers get started/stopped,
look in /etc/rc.d and friends.

--
These are my opinions, not necessarily my employer's. I hate spam.

Rick Jones

unread,
Dec 18, 2009, 5:27:37 PM12/18/09
to
Hal Murray <hal-u...@ip-64-139-1-69.sjc.megapath.net> wrote:
> >but have hit some snags where certain commands are not supported in
> >busybox (service start/stop/reset, chkconfig).

> service is just a script/program to run one of the start/stop
> scritps. It may be a redhat/fedora/linux thing. google will
> find the man page.

> chkconfig is a utility to setup the links for starting
> and stopping services. Again, there is a man page.

> If you aren't familiar with how servers get started/stopped,
> look in /etc/rc.d and friends.

Would this then be a case of it being better to at least occasionally
build one's mnemonic memory circuits from stone knives and bear
skins?-) Or put another way, an example of the perils of speed-dial...

rick jones
--
I don't interest myself in "why." I think more often in terms of
"when," sometimes "where;" always "how much." - Joubert
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

0 new messages