What's the easiest way to make Busybox keep correct time?

Harald Becker ralda at gmx.de
Tue Sep 2 13:31:10 UTC 2014


Hi !

 > I appreciate that you would like to know why this isn't working but
 > I'm really not too keen on rebooting the device several times a day
 > when my original script seems to be working fine.

This is your decision, I fully understand your concerns. Just come back, 
when you have need for this ...

 > *adjtimex*: The thing I am wondering is, when you run it does it make
 > a change that persists through reboots, or does it need to be run
 > each time the system comes up?

I never user the Busybox version of adjtimex, but the original versions 
I used wrote a file in /etc (usually /etc/adjtime). This file contains 
all information the system needs to correct the clock. May be it is 
required to run adjtimex on startup, but then with just some constant 
parameter, pointing it to the file in /etc.

 > Where it says:
>
>         For a machine connected to the Internet, or equipped with a precision
>         oscillator or radio clock, the best way is to regulate the system clock
>         with ntpd(8).  The kernel will automatically update the hardware clock
>         every eleven minutes.

This is correct, if the clock is marked synchronized, the kernel 
automatically updates the hardware clock periodically. This way you 
don't need to manually update the hardware clock in an extra loop. The 
only concern is the clock drift, when Internet connection is not 
available. As soon as ntpd stops updating the clock, the kernel will no 
longer write to the hardware clock.


> But that does not work in the Busybox version of adjtimex.

Let me give a couple of days, I try to get a closer look at the Busybox 
adjtimex and send you a step by step description, how to use it.

--
Harald



More information about the busybox mailing list