NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: setting system clock-rate



On 1 Mar 2009 at 17:54, Kristoff Bonne wrote:

> 
> David,
> 
> 
> 
> David Lord schreef:
>     
>     Due to some reason (probably hardware I guess), the system-
clock runs
>     about 3 % to fast. The RTC-clock is correct, but the system-
clock goes 1
>     to 2 seconds more in advance every minute.
>     
>     The time-difference is that large, that ntpd is unable to sync.
>         
> 
>     
>     
>     On NetBSD-3 I have compiled kernels with "options 
TIMER_FREQ=nnnnnnn"
>     with nnnnnnn adjusted from default so that ntpd frequency 
offset
>     settles down to < 10ppm. Some of the systems have needed 500ppm 

>     frequency adjustment then ntpd doesn't have a problem.
>       
> 
> Do you mean I need to re-compile my kernel, or is this something 
that 
> can be set during boot-time (option of grub or something like 
that?)

I've recompiled kernels including that option.

I've just checked my kernel configs for NetBSD-4.0.1 and even one 
I've found with a large offset on NetBSD-3 (approx +300ppm) has 
been commented out as no longer needed on NetBSD-4.

The drifts you mention are orders of magnitude above those I've 
been correcting for so it's possibly worth trying kernels with 
TIMER_FREQ values adjusted by a similar amount +/- 30000ppm and 
see if that makes a difference (I can't remember in which 
direction the adjustment works). I have a note that default for
TIMER_FREQ=1193182. Having a fast clock and making step 
corrections backwards isn't considered a good idea :-(

David

> 
> 
> Anycase, there's one thing I do not understand. AFAIK, ntpd (if it 
> managed to get syncronised) should be able to calculate the drift 
of 
> the system-clock and than speed it up or slow it down to match the 
> time it receives from it reference.
> 
> So, if there is a system-call to configure the system clock rate, 
why 
> is there no command to do this manually?
> 
> 
> Why is there no "adjtimex" for netbsd?
> 




Home | Main Index | Thread Index | Old Index