Q: Disabling "11 minute mode" - NTP

This is a discussion on Q: Disabling "11 minute mode" - NTP ; Is it possible to disable "11 minute mode" from "ntp.conf"? I've tried using the command "disable kernel" but that appears to change the way time discipline is maintained, but does nothing for "11 minute mode". If using ntp.conf is not ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Q: Disabling "11 minute mode"

  1. Q: Disabling "11 minute mode"


    Is it possible to disable "11 minute mode" from "ntp.conf"?
    I've tried using the command "disable kernel" but that
    appears to change the way time discipline is maintained, but
    does nothing for "11 minute mode".

    If using ntp.conf is not the way, what is?

    Thanks for your help.
    Dean

  2. Re: Q: Disabling "11 minute mode"

    Dean S. Messing wrote:
    > Is it possible to disable "11 minute mode" from "ntp.conf"?
    > I've tried using the command "disable kernel" but that
    > appears to change the way time discipline is maintained, but
    > does nothing for "11 minute mode".
    >
    > If using ntp.conf is not the way, what is?
    >
    > Thanks for your help.
    > Dean


    What IS "11 minute mode"??



  3. Re: Q: Disabling "11 minute mode"

    Richard B. Gilbert wrote:

    >
    > What IS "11 minute mode"??


    If the linux kernel is told that its clock is being disciplined, it sets
    the RTC from the software clock every 11 minutes. Most Unices do
    something like this, although sometimes it is a cron job.

  4. Re: Q: Disabling "11 minute mode"


    Richard B. Gilbert wrote:
    > Dean S. Messing wrote:
    > > Is it possible to disable "11 minute mode" from "ntp.conf"?
    > > I've tried using the command "disable kernel" but that
    > > appears to change the way time discipline is maintained, but
    > > does nothing for "11 minute mode".
    > >
    > > If using ntp.conf is not the way, what is?
    > >
    > > Thanks for your help.
    > > Dean

    >
    > What IS "11 minute mode"??


    Oops. Sorry! I thought everyone reading this list
    (who could answer my question :-) would know.

    David Woolley gave you a good answer already so
    I'll only add that if you want to "see" if you
    are in "11 minute mode", do "adjtimex -p" and
    look at the "status:" value. If it's odd, (LSB==1)
    then your kernel is in "11 minute mode".

    Now, if someone would tell me how to disable it
    (short of hacking time.c) I'd be most thankful.

    I tried turning it off with adjtimex -S 64) but
    ntp changes it back again in a few minutes.

    I'd like to disable it, but keep ntp kernel
    discipline so I can do some analysis of my RTC.

    Dean

  5. Re: Q: Disabling "11 minute mode"

    David Woolley writes:

    >Richard B. Gilbert wrote:


    >>
    >> What IS "11 minute mode"??


    >If the linux kernel is told that its clock is being disciplined, it sets
    >the RTC from the software clock every 11 minutes. Most Unices do
    >something like this, although sometimes it is a cron job.


    Yes, it is a horrible wayto discipline the rtc.
    Better to measure the offset and drift and use that info when you read the
    rtc.
    You have to tell the kernel that the clock is unsynchronized ( the status
    byte in struct timex-- TIME_BAD
    If that is set, the 11 min mode is switched off.
    But I think youhave to keep doing it, since the kernel may decide its
    status is fine.



  6. Re: Q: Disabling "11 minute mode"

    Hello Dean,

    On Tuesday, January 22, 2008 at 19:02:23 +0000, Dean S. Messing wrote:

    > Is it possible to disable "11 minute mode" from "ntp.conf"?


    No. You have to tweak the kernel. If you have the PPSkit:

    | $ echo 0 > /proc/sys/kernel/time/rtc_update

    Otherwise you have to patch time.c in the kernel. Dead easy, just a
    matter of commenting out a line or two. I'm so patching all my kernels,
    reading and writing the RTC exclusively with hwclock 2.31, and am
    getting a far better accuracy.

    The main purpose of an RTC is to initialise the system time at powerup,
    isn't it? Most people startup in the morning at around half a second of
    the true time, and later ntpd has to step this to UTC. I routinely
    startup at some low milliseconds of the true time, offset quickly
    slewed. My last step event was years ago.


    Serge.
    --
    Serge point Bets arobase laposte point net

  7. Re: Q: Disabling "11 minute mode"

    On Tuesday, January 22, 2008 at 23:13:22 +0000, Dean S. Messing wrote:

    > do "adjtimex -p" and look at the "status:" value. If it's odd,
    > (LSB==1) then your kernel is in "11 minute mode".


    Not exactly: bit #0 set means your kernel is in PLL mode. That's bit #6
    unset that means eleven-minutes mode. The kernel does not always enter
    in both modes together.


    Serge.
    --
    Serge point Bets arobase laposte point net

  8. Re: Q: Disabling "11 minute mode"


    Serge Bets wrote:
    > On Tuesday, January 22, 2008 at 19:02:23 +0000, Dean S. Messing wrote:
    >
    > > Is it possible to disable "11 minute mode" from "ntp.conf"?

    >
    > No. You have to tweak the kernel. If you have the PPSkit:
    >
    > | $ echo 0 > /proc/sys/kernel/time/rtc_update
    >
    > Otherwise you have to patch time.c in the kernel. Dead easy, just a
    > matter of commenting out a line or two. I'm so patching all my kernels,
    > reading and writing the RTC exclusively with hwclock 2.31, and am
    > getting a far better accuracy.
    >
    > The main purpose of an RTC is to initialise the system time at powerup,
    > isn't it? Most people startup in the morning at around half a second of
    > the true time, and later ntpd has to step this to UTC. I routinely
    > startup at some low milliseconds of the true time, offset quickly
    > slewed. My last step event was years ago.


    Thanks Serge. I looked up PPSkit. Looks good, but I'm going to have
    to learn how to patch the Fedora kernel to install PPSkit.

    But I'm discovering that I have rather deeper problems on my machine
    (a Dell 490 Precision). Using adjtimex --compare to track the drift
    between system and cmos clock (ntpd not running), I see that the RTC
    is behaving _very_ strangely. It will begin to return screwy values
    after several hours of doing "adjtimex --compare" and then get to the
    point where "hwclcok --show" hangs. So my desire to turn off "11
    minute mode" is mute when ntp is running is mute.

    For your amusement, here's a snippet of the output of
    "adjtime --compare" with an interval of 60 seconds:

    1200982902 0.001784 -2.0 10001 3929312 10001 4060301
    1200982962 0.001792 0.1 10001 3929312 10001 3920719
    1200983022 0.002051 4.3 10001 3929312 10001 3646240
    1200983082 0.001828 -3.7 10001 3929312 10001 4173062
    1200983142 0.001756 -1.2 10001 3929312 10001 4007957
    1200983202 0.002025 4.5 10001 3926656 10001 3632906
    1200983261 0.500370 8305.8 10001 3926288 9918 3549307
    1200983281 40.001689 658355.3 10001 3926288 3418 301130
    1200983341 40.001931 4.0 10001 3926288 10001 3661966
    1200983407 34.001894 -100000.6 10001 3926288 11001 3966652
    1200983461 40.001646 99995.9 10001 3926288 9001 4197121
    1200983521 40.001890 4.1 10001 3926288 10001 3659882
    1200983609 12.001763 -466668.8 10001 3924640 14668 1878649
    1200983641 40.001606 466664.0 10001 3924640 5334 6280787
    1200983741 0.001726 -666664.7 10001 3924640 16668 1609118
    1200983761 40.001911 666669.8 10001 3924640 3334 5907090
    1200983821 40.001553 -6.0 10001 3924640 10001 4315525
    1200983921 0.001748 -666663.4 10001 3924640 16668 1527086
    1200983941 40.001894 666669.1 10001 3924640 3334 5949798
    1200984001 40.001554 -5.7 10001 3924640 10001 4295994
    1200984101 0.001700 -666664.2 10001 3921488 16668 1577580
    1200984161 0.001291 -6.8 10001 3921104 10001 4367718
    1200984221 0.001532 4.0 10001 3921104 10001 3657823
    1200984275 6.001806 100004.6 10001 3921104 9001 3621886
    1200984301 40.001722 566665.3 10001 3920368 4334 6196568
    1200984361 40.001974 4.2 10001 3920368 10001 3645108
    1200984427 34.001868 -100001.8 10001 3920368 11001 4036253
    1200984481 40.001679 99996.8 10001 3920368 9001 4126878

    Things got so bad that the output eventually became:

    199345540 1001658696.064552 1592732.9 10001 3879376 -5926 1725431
    199345717 1001658600.500585 -1592732.8 10001 3879376 25928 6027853
    199345718 1001658696.023830 1592054.1 10001 3879376 -5919 335126
    199345896 1001658600.500586 -1592054.1 10001 3879376 25922 868985
    199345897 1001658696.045414 1592413.8 10001 3879376 -5923 2975047


    Before it went crazy, it had run smoothly for 5 or 6 hours.
    When I rebooted into the BIOS and looked at the RTC it was off by
    several years.

    This has now happened thrice, but only when adjtimex is running in the
    compare mode for long periods. I have no idea what this means. The
    cmos battery does not appear to be the problem since, after a reboot,
    the RTC remains at proper time indefinitely (modulo drift), unless
    and until I run adjtimex --compare for several hours.

    Anyway, thanks for the info. on "11 minute mode". Wish I could fix my
    RTC problem

    Dean

  9. Re: Q: Disabling "11 minute mode"


    Serge Bets wrote:
    : On Tuesday, January 22, 2008 at 23:13:22 +0000, Dean S. Messing wrote:
    :
    : > do "adjtimex -p" and look at the "status:" value. If it's odd,
    : > (LSB==1) then your kernel is in "11 minute mode".
    :
    : Not exactly: bit #0 set means your kernel is in PLL mode. That's bit #6
    : unset that means eleven-minutes mode. The kernel does not always enter
    : in both modes together.

    Correct. Thanks for correcting this bit of mis-information. I was
    mis-remembering the fact that by disabling PLL mode (with the ntp
    "disable kernel" directive, I think) _and_ setting status bit #6,
    I could keep the kernel out of "11 minute mode". That was done a
    couple of years ago on another machine and I was confusing the two
    things.

    Dean

  10. Re: Q: Disabling "11 minute mode"

    deanm@sharplabs.com (Dean S. Messing) writes:

    > Serge Bets wrote:
    >> On Tuesday, January 22, 2008 at 19:02:23 +0000, Dean S. Messing wrote:
    >>
    >> > Is it possible to disable "11 minute mode" from "ntp.conf"?

    >>
    >> No. You have to tweak the kernel. If you have the PPSkit:
    >>
    >> | $ echo 0 > /proc/sys/kernel/time/rtc_update
    >>

    [...]
    > Thanks Serge. I looked up PPSkit. Looks good, but I'm going to have
    > to learn how to patch the Fedora kernel to install PPSkit.


    PPSkit is based on kernel 2.4. Recent changes in kernel 2.6 were dramatic
    regarding the time code. I'm unsure if an equivalent mechanism exists in 2.6,
    but it would be nice if someone would port "the pearls" to kernel 2.6.

    [...]

    Ulrich

+ Reply to Thread