On NTP server, how to check offset betweenclient and NTP server? - NTP

This is a discussion on On NTP server, how to check offset betweenclient and NTP server? - NTP ; Dear All I have stratum 2 NTP server. My client request time from my NTP server. On my NTP server, how to know offset of between my client and my server ? I found ntp_script software suite from http://www.schlitt.net/scripts/ntp/ . ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: On NTP server, how to check offset betweenclient and NTP server?

  1. On NTP server, how to check offset betweenclient and NTP server?

    Dear All
    I have stratum 2 NTP server. My client request time from my NTP
    server. On my NTP server, how to know offset of between my client and
    my server ? I found ntp_script software suite from
    http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    directly.

    Thanks
    Chong

  2. Re: On NTP server, how to check offset between client and NTP server?

    On 2008-10-09, chowalit.lab Chowalit Lab Linux wrote:

    > I have stratum 2 NTP server. My client request time from my
    > NTP server. On my NTP server, how to know offset of between my
    > client and my server ? I found ntp_script software suite from
    > http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    > directly.


    If your "client" is also running ntpd you can use ntpq to see the
    client's view of its offset from the server. Just run 'ntpq -p' on the
    client system.

    --
    Steve Kostecke
    NTP Public Services Project - http://support.ntp.org/

  3. Re: On NTP server, how to check offset between client and NTP server?

    chowalit.lab@gmail.com (chowalit.lab Chowalit Lab Linux) writes:

    >Dear All
    > I have stratum 2 NTP server. My client request time from my NTP
    >server. On my NTP server, how to know offset of between my client and
    >my server ? I found ntp_script software suite from
    >http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    >directly.


    No idea what you are asking. Your ntp machine is working hard to make sure
    its time is the same as the server's time. What offset?

    I think you need to rethink your question.


    >Thanks
    >Chong


  4. Re: On NTP server, how to check offset between client and NTP server?

    chowalit.lab Chowalit Lab Linux wrote:
    > I have stratum 2 NTP server. My client request time from my NTP
    > server. On my NTP server, how to know offset of between my client and
    > my server ? I found ntp_script software suite from
    > http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    > directly.


    When NTP is working properly, the difference between the time on the
    client is zero within statistical error. The "offset" will, more often
    than not, exceed the statistical error in the actual time difference.

    There are situations, in which this doesn't hold true for NTP,
    particularly within a few hours of system startup (and also after sudden
    temperature changes), and these are discussed in the thread entitled
    "Slow convergence of NTP with GPS/PPS", although the situation will be
    more extreme there, as one can read a reference clock with less
    statistical error than an ethernet connected server. You can get more
    on this theme from most of the recent long running threads.

    Once you've read and understand these, if you still find you want to
    measure the figure that ntpd calls "offset", you treat the client as a
    server and run ntpq on the real server, and use the peers command.

    If you want to measure the actual offset between the clocks, you will
    need to add special instrumentation to the kernel, and special hardware.
    You will then want to ask yourself why you don't use the error
    measured by that instrumentation to apply corrections to reduce that
    error to the statistical noise level!

    But, again, remember that any time synchronisation protocol optimised
    for minimum phase error will never be able to measure the actual error,
    as any error it can measure it will have corrected.

  5. Re: On NTP server, how to check offset betweenclient and NTP server?

    Dear Unruh and All
    Sorry for my english, It make you confuse. So I will explain
    about my system.

    - I have NTP server.
    - NTP server install on CentOS.
    - This NTP server serve client to sync time.
    - My clients are windows XP, Windows 2003, Linux.

    My question:
    - How to check the different time between NTP server and client on
    NTP server side.

    Thanks you
    Chong


    On Fri, Oct 10, 2008 at 2:01 AM, Unruh wrote:
    > chowalit.lab@gmail.com (chowalit.lab Chowalit Lab Linux) writes:
    >
    >>Dear All
    >> I have stratum 2 NTP server. My client request time from my NTP
    >>server. On my NTP server, how to know offset of between my client and
    >>my server ? I found ntp_script software suite from
    >>http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    >>directly.

    >
    > No idea what you are asking. Your ntp machine is working hard to make sure
    > its time is the same as the server's time. What offset?
    >
    > I think you need to rethink your question.
    >
    >
    >>Thanks
    >>Chong

    >
    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.org
    > https://lists.ntp.org/mailman/listinfo/questions
    >


  6. Re: On NTP server, how to check offset between client and NTP server?

    Steve Kostecke wrote:

    > On 2008-10-09, chowalit.lab Chowalit Lab Linux
    > wrote:
    >
    >> I have stratum 2 NTP server. My client request time from my
    >> NTP server. On my NTP server, how to know offset of between my
    >> client and my server ? I found ntp_script software suite from
    >> http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    >> directly.

    >
    > If your "client" is also running ntpd you can use ntpq to see the
    > client's view of its offset from the server. Just run 'ntpq -p' on the
    > client system.


    If I've understood the original question correctly then this monitoring
    should be done from the server. So there are several possibilities:

    1.) run ntpq -p on the server but actually send the request to the client:
    ntpq -p

    2.) if the client does not respond to 'ntpq -p' requests, use ntpdate:
    ntpdate -q

    3.) if monitoring should be done continuously and you have only a couple of
    known clients, you can add them to your server's ntp.conf file and tell the
    server just to poll them but not to try to synchronize to the clients.
    In ntp.conf:
    server noselect

    In the latter case, if you run 'ntpq -p' on the server you also get a list
    which tells you the estimated time offset of each client.

    Martin
    --
    Martin Burnicki

    Meinberg Funkuhren
    Bad Pyrmont
    Germany

  7. Re: On NTP server, how to check offset between client and NTP server?

    chowalit.lab Chowalit Lab Linux wrote:

    > - My clients are windows XP, Windows 2003, Linux.
    >
    > My question:
    > - How to check the different time between NTP server and client on
    > NTP server side.


    That will be very difficult for the Windows ones. For the Linux ones,
    add code to the clock interrupt routine that pulses a printer port line
    or modem control signal (do not use USB ports), and simultaneously
    writes the offset between the software clock time and the nominal, round
    number of milliseconds, tick time, to a buffer. At user level copy that
    buffer to a file.

    Do this on both client and server.

    Set up some suitable instrumentation to measure and log the time delay
    between the pulses on client and server, then process the results in
    conjunction with the client and server's idea of the time at the time of
    the pulse.

    This assumes that the machines are electrically close.

    Don't worry too much on Windows, as the time is likely to be more
    accurate than the resolution with which ordinary application programs
    can read it. If you are using w32time on XP, don't worry, because
    w32time is not intended for precision time keeping on that platform, and
    doesn't default for it on 2003.

    If you want to measure the value during the startup and other transients
    that Dave Mills considers unimportant, use ntpq on the server. This
    will not work for any machines using w32time. You might also configure
    the client as an ignored server for the server, or maybe peering them,
    to allow ntpq peers run on the server, against the server, to give a
    reverse "offset" value. Note these methods only give you historical
    information. For a near instantaneous snapshot, use ntpdate -d.

    The reason you are getting such complex answers is that you are asking
    to measure something that, in an ideal system, is theoretically
    unmeasurable.

  8. Re: On NTP server, how to check offset between client and NTP server?

    chowalit.lab@gmail.com (chowalit.lab Chowalit Lab Linux) writes:

    >Dear Unruh and All
    > Sorry for my english, It make you confuse. So I will explain
    >about my system.


    > - I have NTP server.
    > - NTP server install on CentOS.
    > - This NTP server serve client to sync time.
    > - My clients are windows XP, Windows 2003, Linux.


    > My question:
    > - How to check the different time between NTP server and client on
    >NTP server side.


    Are the clients running ntp? If they are
    ntpq -p name.of.client
    will tell you what the offset was on the last query they made to the
    server.

    If they are not, then I do not know.
    Now if they are running ntp they are trying their best ( as defined by the
    ntp algorithm) to keep their time equal to the server's. Why do you want to
    know?



    >Thanks you
    >Chong



    >On Fri, Oct 10, 2008 at 2:01 AM, Unruh wrote:
    >> chowalit.lab@gmail.com (chowalit.lab Chowalit Lab Linux) writes:
    >>
    >>>Dear All
    >>> I have stratum 2 NTP server. My client request time from my NTP
    >>>server. On my NTP server, how to know offset of between my client and
    >>>my server ? I found ntp_script software suite from
    >>>http://www.schlitt.net/scripts/ntp/. It's not solve my problem
    >>>directly.

    >>
    >> No idea what you are asking. Your ntp machine is working hard to make sure
    >> its time is the same as the server's time. What offset?
    >>
    >> I think you need to rethink your question.
    >>
    >>
    >>>Thanks
    >>>Chong

    >>
    >> _______________________________________________
    >> questions mailing list
    >> questions@lists.ntp.org
    >> https://lists.ntp.org/mailman/listinfo/questions
    >>


+ Reply to Thread