[ntp:questions] Linux NTP Kernel unsync flag remains long after NTP&Kernel have PPL sync

Serge Bets serge.bets at NOSPAM.laposte.invalid
Thu Aug 28 22:11:05 UTC 2008


Hello Darryl,

 On Tuesday, August 26, 2008 at 22:24:37 +0000, Darryl Miles wrote:

> I'm not sure I agree that hwclock/drift file is even good for managing
> the hardware RTC. While the machine is switched on we have NTP, while
> the machine is switched off the internal/component temperature is
> vastly different so any drift estimation maintained over time whilst
> powered up might not be in the right ballpark

Of course: hwclock needs the switched-off-during-night RTC drift rate in
its /etc/adjtime file, in order to initialise at best the system clock
at startup next morning, before NTP takes control.


> you do maintain different drift data whilst powered up and powered
> down don't you ?

Outside of some specific cases (like 24/7 servers), generally hwclock
doesn't really care about the drift rate of the RTC during power up.
Maintaining 2 rates is of course possible, but delicate. In many cases
there is only one important drift rate: the power-down rate.


One basic method to get and use the power-down RTC drift rate is to call
"hwclock --systohc --nodrift" during shutdown, with --nodrift to prevent
an importune recalculation of the rate. Then after startup, as soon as
the system clock is tightly synced, call "hwclock --systohc" to evaluate
the RTC drift since the last shutdown. However this method cannot
possibly work with the eleven-minutes mode.


Serge.
-- 
Serge point Bets arobase laposte point net




More information about the questions mailing list