[ntp:questions] Linux 11-minute mode (RTC update)

Noob root at localhost.invalid
Fri Apr 4 12:25:12 UTC 2008

Serge Bets wrote:

> Noob wrote:
>> STA_UNSYNC (0x0040, clock unsynchronized) is 0. [...] Thus the kernel
>> should write the system time to the RTC every 11 minutes; but it does
>> not.
> Fine! Don't touch anything, happy man, or it might well "tomber en
> marche".

Hello Serge, I was hoping you'd comment!

If I don't want the kernel to update the RTC, I can always undef 

> Real men don't want the eleven-minutes mode.


> It is not only extremely inaccurate by itself, but it also steps on
> the toes of those tools that are able to manage the RTC properly.

Our equipment is supposed to run 24/7 for months / years.
I need to keep the RTC synchronized, in case of power failure.

Do you believe that running hwclock --systohc periodically is better 
than using the kernel's 11-minute mode?

> I previously posted some figures, comparing the accuracy of writing the
> RTC (not counting drift). Mean offset and dispersion:
>  - eleven-minutes mode:           -2150 µs +-5000
>  - hwclock util-linux-ng 2.13.1:  -2500 µs  +-170
>  - hwclock 2.32 from BJH:             0 µs   +-10

Point taken.

( I use http://giraffe-data.com/software/about_hwclock.html )

If I use hwclock to update the RTC, how often should I do it?

What do you think about the following script?

while true
   sleep 660  # or some other value?
   hwclock --utc --systohc

> Furthermore both hwclocks are able to evaluate and compensate the drift
> of the RTC. The eleven-minutes mode cannot do that, and instead it can
> perturbate hwclock's calculations.

Is the crystal of the RTC supposed to be more stable than the crystal 
of the CPU?


More information about the questions mailing list