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

Noob root at localhost.invalid
Tue Apr 8 08:01:59 UTC 2008


Serge Bets wrote:

> This never happens on a proper setup: hwclock --hctosys syncs on the RTC
> down to a few microseconds.

I have a question regarding hwclock --systohc (the other way around).

After setting the RTC, hwclock reports:
Hardware clock ended up -0.001261 seconds from intended set time.

And this "offset" is always approximately -1.25 ms
What is the problem here? Is it even a problem?

NB: even though hwclock thinks the kernel is in 11-minute mode,
I've removed the code where the kernel writes to the RTC.


Full dump:

# hwclock --utc --systohc --cpupriority=99 --debug
hwclock 2.30
Kernel IS in 11 minute mode
WARNING from hwclock: The clock was in 11 minute mode, which normally 
means that something else, possibly an NTP daemon, has been setting 
the hardware clock.  Setting the clock with hwclock turns off 11 
minute mode.  See hwclock documentation.
User did not specify a clock access method.  Searching for one...
Found RTC device special file '/dev/rtc'
Using rtc ioctl interface to clock via file '/dev/rtc'.
Adjtime file contents:
   drift factor = 0.000000, missed in last set = 0.000000
   LOCAL (0 seconds west of GMT), epoch = 1900
   Last drift adjustment done Thu Jan  1 00:00:00 1970 (Time 0) + 
0.000000 secs
   Last calibration done Thu Jan  1 00:00:00 1970 (Time 0)
   Correction: -0.000028
Assuming hardware clock's zero year is 1900
Assuming hardware clock is kept in UTC time.
Setting absolute priority to 99
At 1207641420.196823, waiting for clock tick...
    Waiting for interrupt...
...got clock tick at system time 1207641420.603735
Raw time read from Hardware Clock: Y=2008 M=4 D=8 07:56:59
mktime_tz: TZ environment variable is not set.
mktime_tz: temporarily setting TZ to HWCLOCK_TEMP +00:00
Hw clock time : Tue Apr  8 07:56:59 2008 = 1207641419 seconds since 
1969 UTC
Restoring absolute priority to 0
Reference time for clock setting is 1207641420.604020
Setting absolute priority to 99
Time elapsed since reference time has been 0.000052 seconds.
Will set the clock at 1207641421.500028
localtime_tz: TZ environment variable is not set.
mktime_tz: temporarily setting TZ to HWCLOCK_TEMP +00:00
Will set Hardware Clock to 07:57:01(+.5) with timezone offset 0 
seconds, which is 1207641421 (+.5) seconds since 1969 UTC
Waiting for Time 1207641421.500028 - the next odd half-second
Sleeping for 0.875895 seconds. Good night everybody!
ioctl(RTC_SET_TIME) was successful.
Restoring absolute priority to 0
Hardware Clock has been set.
Now wait for next clock tick (should be 500 ms).
Setting absolute priority to 99
At 1207641421.500223, waiting for clock tick...
    Waiting for interrupt...
...got clock tick at system time 1207641422.001261
Raw time read from Hardware Clock: Y=2008 M=4 D=8 07:57:02
mktime_tz: TZ environment variable is not set.
mktime_tz: temporarily setting TZ to HWCLOCK_TEMP +00:00
Hw clock time : Tue Apr  8 07:57:02 2008 = 1207641422 seconds since 
1969 UTC
Restoring absolute priority to 0
It is now 1.397241 seconds since reference time.
Hardware clock ended up -0.001261 seconds from intended set time.
Not adjusting drift factor because of -nodrift optionor 11 minute 
modenew timezone offset for hardware clock is 0




More information about the questions mailing list