On 2025-10-08, Denys Vlasenko <[email protected]> wrote:
> On Fri, Sep 19, 2025 at 5:01 PM Grant Edwards <[email protected]> 
> wrote:
>> [Busybox version is rather old (v1.31.0) and the kenel is 2.6.33.7]
>>
>> I'm using busybox ntpd and it appears to be working except for the
>> fact that the return value from the adjtimex() kernel system call
>> almost always returns TIME_ERROR and status bits of PLL UNSYNC [and
>> sometimes FREQHOLD].
>>
>> Once avery 64 seconds, ntpd polls the server, and the adjtimex()
>> return is TIME_OK for a fraction of a second with status bits of PLL
>> [sometimes FREQHOLD]. After a fraction of a second it returns to
>> return of TIME_ERROR with the UNSYNC status bit set until the next
>> poll.
>
> "It" returns? Can you be more specific? *What* returns?

I'm asking about the TIME_ERROR return from the library call to
adjtimex().

>> It looks like usually the FREQHOLD status bit comes on initially
>> and then goes away after several minutes — but it sometimes comes
>> back on later.
>
> FREQHOLD is used for several minutes after startup to avoid
> introducing bogus frequency correction while time offset being
> corrected.

OK, I thought it was probably something like that.

>> The UNSYNC bit is always set except for a fraction of second after
>> each ntp poll.
>
> Describe how do you check UNSYNC bit.

When you call adjtimex(struct timex *buf), it writes to the timex
strucutre 'buf'.  To check the UNSYNC bit you look at (buf.status &
STA_UNSYNC).

No matter how long I wait after starting busybox ntpd, the STAT_UNSYNC
bit is almost always set. It only reads as zero for a couple hundred
milliseconds after ntpd does a poll.

--
Grant

_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to