When certain time-related programs (like ntpd
) are running on a Linux system, the kernel will switch into so-called "eleven minute mode" (see the hwclock
man page) whereby it will automatically update the hardware clock from the system clock every eleven minutes.
On SLES11 I have empirically determined that if I set the hardware clock to be something like 10 hours behind the system clock, 11-minute mode seems incapable of making the hardware clock match the system clock. But if I set the hardware clock 5 minutes behind the system clock, 11-minute mode makes a perfect match.
So apparently there's some maximum update that 11-minute mode can handle and I'm wondering what it is.
Update:
This is weird...
More experimentation shows that when I have the HW clock around 20 minutes behind the system clock the 11-minute mode will set the HW clock to be exactly 30 minutes behind the system clock (!):
# date
Tue Dec 6 10:16:52 EST 2011
# hwclock --set --date "12/6/11 09:56"
#
# date
Tue Dec 6 10:17:16 EST 2011
# hwclock --show
Tue Dec 6 09:56:06 2011 -0.156551 seconds
#
# date
Tue Dec 6 10:23:09 EST 2011
# hwclock --show
Tue Dec 6 10:01:58 2011 -0.535772 seconds
#
# date
Tue Dec 6 10:34:28 EST 2011
# hwclock --show
Tue Dec 6 10:04:27 2011 -0.192025 seconds
Update:
I ran across this: https://bugs.archlinux.org/task/27408 which does imply that for good or bad the kernel will not update the hardware clock when the hardware clock time is too far off from the system clock time.
From the
hwclock
man page on RHEL 4.6:So by the virtue of you running
hwclock --set
you have likely turned it off. By the same token you can check the output of theadjtimex --print
to confirm.In fact this has nothing to do with eleven-minute-mode in kernel. This is related to a feature in ntpd.
Are you aware of so-called sanity limit of ntp? If the time is too far away (for example 10 hours) ntpd gives up and doesn't skew the clock. In those cases, ntpd or ntpdate should be run manually. Ntpd option of
-g
should do that. Check information from the man page:http://doc.ntp.org/4.1.0/ntpd.htm
Kernel will not sync the time if it's off more than 60 minutes when in Eleven Minute mode. This is a common problem in SUSE Enterprise, see this article from Open SUSE for some more details: https://lists.opensuse.org/opensuse-bugs/2011-06/msg01348.html