ntptime says that clock is unsynchronized - NTP

This is a discussion on ntptime says that clock is unsynchronized - NTP ; Hello, I'm trying to analyze a failure scenario that occurs on a server and client in my network. First my server, which only synchronizes to the system clock: # ntpq -p remote refid st t when poll reach delay offset ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: ntptime says that clock is unsynchronized

  1. ntptime says that clock is unsynchronized

    Hello,

    I'm trying to analyze a failure scenario that occurs on a server and
    client in my network. First my server, which only synchronizes to the
    system clock:

    # ntpq -p
    remote refid st t when poll reach delay
    offset jitter
    ================================================== =======================
    =====
    *LOCAL(0) LOCAL(0) 10 l 10 16 377 0.000
    0.000 0.001

    I *know* that it should have more upstream peers, but that is beside
    the point I hope. My client synchronizes to that server just fine:

    # ntpq -p
    remote refid st t when poll reach delay
    offset jitter
    ================================================== =======================
    =====
    LOCAL(0) LOCAL(0) 12 l 7 16 377 0.000
    0.000 0.001
    *192.168.1.4 LOCAL(0) 11 u 22 64 377 0.118
    41.432 0.524

    But when I run ntptime on the server, I get this:

    # ntptime
    ntp_gettime() returns code 5 (ERROR)
    time ccbd930d.7cfa6000 Thu, Nov 6 2008 16:00:13.488, (.488195),
    maximum error 16384000 us, estimated error 16 us
    ntp_adjtime() returns code 5 (ERROR)
    modes 0x0 (),
    offset 0.000 us, frequency 0.000 ppm, interval 4 s,
    maximum error 16384000 us, estimated error 16 us,
    status 0x41 (PLL,UNSYNC),
    time constant 0, precision 1.000 us, tolerance 512 ppm,
    pps frequency 0.000 ppm, stability 512.000 ppm, jitter 200.000 us,
    intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

    Why the errors? Return code 5 means that the clock is unsynchronized
    but I see no reason for that to happen. It is perfectly synchronized
    to the system clock. Maximum error is 16384000 which I think is some
    default value? ntptime on the client looks much healthier:

    # ntptime
    ntp_gettime() returns code 0 (OK)
    time ccbd93a3.42335000 Thu, Nov 6 2008 16:02:43.258, (.258595),
    maximum error 6263312 us, estimated error 16 us
    ntp_adjtime() returns code 0 (OK)
    modes 0x0 (),
    offset 0.000 us, frequency -18.108 ppm, interval 4 s,
    maximum error 6263312 us, estimated error 16 us,
    status 0x1 (PLL),
    time constant 0, precision 1.000 us, tolerance 512 ppm,
    pps frequency 0.000 ppm, stability 512.000 ppm, jitter 200.000 us,
    intervals 0, jitter exceeded 0, stability exceeded 0, errors 0.

    The system appears to work fine at the moment, but why the strange
    ntptime output?

    Thanks in advance. Please let me know if you need more information.


    --
    mvh Björn

  2. Re: ntptime says that clock is unsynchronized

    BJörn Lindqvist wrote:

    > # ntptime
    > ntp_gettime() returns code 5 (ERROR)
    > time ccbd930d.7cfa6000 Thu, Nov 6 2008 16:00:13.488, (.488195),
    > maximum error 16384000 us, estimated error 16 us


    What ntp.conf and command line options are you using. Some options,
    such as used to disable stepping, are incompatible with the use of the
    kernel time discipline.

    PS I know of no valid reason for configuring a LOCAL clock driver on a
    pure client. It can only cause confusion.

    PPS If anyone suggests orphan mode, point them to the recent thread in
    which evidence that it doesn't work properly for time islands has gone
    unchallenged.

  3. Re: ntptime says that clock is unsynchronized

    2008/11/8 David Woolley :
    > BJörn Lindqvist wrote:
    >
    >> # ntptime
    >> ntp_gettime() returns code 5 (ERROR)
    >> time ccbd930d.7cfa6000 Thu, Nov 6 2008 16:00:13.488, (.488195),
    >> maximum error 16384000 us, estimated error 16 us

    >
    > What ntp.conf and command line options are you using. Some options,
    > such as used to disable stepping, are incompatible with the use of the
    > kernel time discipline.


    ntp.conf on the server:

    server 127.127.1.0 burst iburst minpoll 4 maxpoll 4
    fudge 127.127.1.0 stratum 10
    trap 127.0.0.1
    restrict default noquery nomodify
    restrict 127.0.0.1
    driftfile /var/lib/ntp/drift/ntp.drift
    logfile /var/log/ntp
    disable kernel

    and on the client:

    server 127.127.1.0 burst iburst minpoll 4 maxpoll 4
    fudge 127.127.1.0 stratum 12
    server 192.168.1.4
    restrict default noquery nomodify
    restrict 127.0.0.1
    driftfile /var/lib/ntp/drift/ntp.drift
    logfile /var/log/ntp
    disable kernel

    And standard options I think:

    /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp

    The thing is that the ntptime problems are intermittent. Sometimes
    ntptime returns ERROR and other times OK. I can't see any pattern to
    it.

    > PS I know of no valid reason for configuring a LOCAL clock driver on a
    > pure client. It can only cause confusion.


    Actually the client may serve as a server in case its upstream
    reference disappears. So that other pure clients can still get time
    from someplace.


    --
    mvh Björn

  4. Re: ntptime says that clock is unsynchronized

    BJörn Lindqvist wrote:

    > disable kernel


    ntptime reports the state of the kernel time discipline. This options
    prevents the use of the kernel time discipline. You should not expect
    expect useful information form ntptime when using this.


+ Reply to Thread