A question - NTP

This is a discussion on A question - NTP ; Sorry for my english, and sorry if my question is too easy, but I tried for many days looking at several sites, but I didn't yet solved the question (I am very new on any question related to internet time, ...

+ Reply to Thread
Results 1 to 20 of 20

Thread: A question

  1. A question

    Sorry for my english, and sorry if my question is too easy, but I tried for
    many days looking at several sites, but I didn't yet solved the question (I
    am very new on any question related to internet time, ntp ...).

    I use windows systems (2000 or XP)

    I would like to connect to any server to receive a string where it is
    written the istant time (possibly hh.mm.ss.xxx ). I found several sites
    where I may read hh.mm.ss then downloading the page and reading it I could
    get the string hh.mm.ss but
    1) I'm afraid this is not the fastest way to get istant time (isnt' it
    possible somethingh like tcp to any port to any server to receive the answer
    ?)
    2) sites I found give only hh.mm.ss, not hh.mm.ss.xxx

    Thank you.
    --
    Bruno Cocciaro
    --- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    --- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    --- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)



  2. Re: A question


    >I would like to connect to any server to receive a string where it is
    >written the istant time (possibly hh.mm.ss.xxx ). I found several sites
    >where I may read hh.mm.ss then downloading the page and reading it I could
    >get the string hh.mm.ss but


    I don't know of any servers that do that.

    In the early Arpanet days, there was a RFC describing a time
    service available via UDP and TCP. It returned the date and time
    as a string. Seconds were good enough back then.

    You can probably find code that does that and patch it to
    return what you want. That assumes you have a server you
    can run it on.

    If you are happy with binary results (rather than a string)
    you could use NTP. (Don't forget to consider time zones.)

    --
    These are my opinions, not necessarily my employer's. I hate spam.


  3. Re: A question

    "Bruno Cocciaro" writes:

    >Sorry for my english, and sorry if my question is too easy, but I tried for
    >many days looking at several sites, but I didn't yet solved the question (I
    >am very new on any question related to internet time, ntp ...).


    >I use windows systems (2000 or XP)


    >I would like to connect to any server to receive a string where it is
    >written the istant time (possibly hh.mm.ss.xxx ). I found several sites


    Not sure what "istant time" is.
    Youcould install ntp on your own machine and it would then keep the clock
    on your own system "accurate". (Note that AFAIK windows does not keep time
    to any better than about 1/10 of a sec. You cannot read it to msec. Note
    that your eyes and brain cannot process the time to better than 1/10 of a
    sec, and your reaction time is not better than that, so you could not read
    a remote machine and get anything better than 1/10 sec resolution)

    Some servers will respond to an rdate request, although that process is
    pretty much died.


    >where I may read hh.mm.ss then downloading the page and reading it I could
    >get the string hh.mm.ss but
    >1) I'm afraid this is not the fastest way to get istant time (isnt' it
    >possible somethingh like tcp to any port to any server to receive the answer
    >?)
    >2) sites I found give only hh.mm.ss, not hh.mm.ss.xxx


    You want this for what purpose?




  4. Re: A question

    Hal Murray wrote:
    >> I would like to connect to any server to receive a string where it is
    >> written the istant time (possibly hh.mm.ss.xxx ). I found several sites
    >> where I may read hh.mm.ss then downloading the page and reading it I could
    >> get the string hh.mm.ss but

    >
    > I don't know of any servers that do that.
    >
    > In the early Arpanet days, there was a RFC describing a time
    > service available via UDP and TCP. It returned the date and time
    > as a string. Seconds were good enough back then.
    >


    Perhaps you are thinking of 'rdate' RFC-868.

  5. Re: A question

    Hal,

    "telnet ntp.alaska.edu daytime". Other busy NIST servers don't do
    TCP/TIME anymore, but others might.

    Dave

    DaveHal Murray wrote:
    >>I would like to connect to any server to receive a string where it is
    >>written the istant time (possibly hh.mm.ss.xxx ). I found several sites
    >>where I may read hh.mm.ss then downloading the page and reading it I could
    >>get the string hh.mm.ss but

    >
    >
    > I don't know of any servers that do that.
    >
    > In the early Arpanet days, there was a RFC describing a time
    > service available via UDP and TCP. It returned the date and time
    > as a string. Seconds were good enough back then.
    >
    > You can probably find code that does that and patch it to
    > return what you want. That assumes you have a server you
    > can run it on.
    >
    > If you are happy with binary results (rather than a string)
    > you could use NTP. (Don't forget to consider time zones.)
    >


  6. Re: A question

    "Hal Murray" wrote in message
    newsZOdnYCQicMrLoXVnZ2dnUVZ_tninZ2d@megapath.net...

    > If you are happy with binary results (rather than a string)
    > you could use NTP. (Don't forget to consider time zones.)


    Yes, binary results may be good. But I am not able to get this result. I
    installed any progs, for example Dimension 4, which connect to any server
    and syncronize my pc clock, but this is not what I want.
    My problem is this: I run a Labview program which repeat several
    measurements (for example 10^6 measurements, 0.1 sec for each one). Labview
    prog uses an internal clock which says each measurement is 0.100 s, but I
    need to know the instant at which prog performs the first measurement and I
    must check that after 10^6 mesurements 1000??.??? seconds was spent. I am
    not sure of the fidelity of the internal clock used by Labview. My idea was
    that the fastest way to control the fidelity of the internal clock is to add
    a little part in my prog where Labview ask to any server the time, for
    example by a TCP or by any other way.

    Thank you very much to any user answered.
    --
    Bruno Cocciaro
    --- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    --- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    --- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)



  7. Re: A question

    "Unruh" wrote in message
    news:tu4Sj.3454$XI1.514@edtnps91...

    > You want this for what purpose?


    I just explained my purpose in the answer to Hal Murray.

    Thank you for the help.
    --
    Bruno Cocciaro
    --- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    --- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    --- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)



  8. Re: A question

    The original party was trying to find something with a resolution
    greater than 1 s but in ASCII.


    Greg Dowd
    gdowd at symmetricom dot com (antispam format)
    Symmetricom, Inc.
    www.symmetricom.com
    "Everything should be made as simple as possible, but no simpler" Albert
    Einstein


    > -----Original Message-----
    > From: questions-bounces+gdowd=symmetricom.com@lists.ntp.org
    > [mailto:questions-bounces+gdowd=symmetricom.com@lists.ntp.org]
    > On Behalf Of David L. Mills
    > Sent: Wednesday, April 30, 2008 5:35 PM
    > To: questions@lists.ntp.org
    > Subject: Re: [ntp:questions] A question
    >
    > Hal,
    >
    > "telnet ntp.alaska.edu daytime". Other busy NIST servers
    > don't do TCP/TIME anymore, but others might.
    >
    > Dave
    >
    > DaveHal Murray wrote:
    > >>I would like to connect to any server to receive a string

    > where it is
    > >>written the istant time (possibly hh.mm.ss.xxx ). I found several
    > >>sites where I may read hh.mm.ss then downloading the page

    > and reading
    > >>it I could get the string hh.mm.ss but

    > >
    > >
    > > I don't know of any servers that do that.
    > >
    > > In the early Arpanet days, there was a RFC describing a

    > time service
    > > available via UDP and TCP. It returned the date and time

    > as a string.
    > > Seconds were good enough back then.
    > >
    > > You can probably find code that does that and patch it to

    > return what
    > > you want. That assumes you have a server you can run it on.
    > >
    > > If you are happy with binary results (rather than a string)

    > you could
    > > use NTP. (Don't forget to consider time zones.)
    > >

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


  9. Re: A question

    On 2008-04-30, Bruno Cocciaro wrote:

    > I am not sure of the fidelity of the internal clock used by Labview.
    > My idea was that the fastest way to control the fidelity of the
    > internal clock is to add a little part in my prog where Labview ask to
    > any server the time, for example by a TCP or by any other way.


    Depending on which server you choose, and the particular network path
    in use at the time you poll it, the delay in receiving the reponse to
    your time request may be as short as 20ms or as long as 200ms. And it
    will most assuredly not be the same every time.

    This in one of the problems that NTP is designed to solve.

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

  10. Re: A question

    Bruno Cocciaro wrote:
    >
    > Yes, binary results may be good. But I am not able to get this result. I


    Note that the ASCII protocol that does this is standard in every Unix,
    and might also be in Windows. In Unix, it is normally implemented in
    inetd as an internal function. However, it is now almost universally
    disabled and/or blocked by firewalls, on the the basis of not opening
    any unnecessary services. It only has one second resolution.

    > installed any progs, for example Dimension 4, which connect to any server
    > and syncronize my pc clock, but this is not what I want.


    Getting the time at the time that the server constructed the return
    packet is a fairly trivial bit of programming; just formulate an NTP
    client packet, and read the response. You ought to comply with the SNTP
    rules for clients, but they are fairly easy.

    However, it is unlikely that you actually want that time. It is more
    likely that you want the time either at which you launched the enquiry,
    or at the time the reply returned to you, and you want that even if you
    don't accurately no the network propagation delay. Quite honestly, the
    easiest way of achieving that is to use a time synchronisation protocol,
    pure NTP or chrony with NTP wire formats, for example, to discipline
    the local software clock and then to read the local software clock.

    Note, I wouldn't touch anything except the reference implementation of
    NTP and chrony. If you use the full NTP algorithm, no third party
    program is going to do it better. Chrony uses a different algorithm,
    but also one that has been thought out. Any other programs either use a
    very cut down algorithm or offer no advantage over the reference NTP.

    > My problem is this: I run a Labview program which repeat several
    > measurements (for example 10^6 measurements, 0.1 sec for each one). Labview
    > prog uses an internal clock which says each measurement is 0.100 s, but I
    > need to know the instant at which prog performs the first measurement and I
    > must check that after 10^6 mesurements 1000??.??? seconds was spent. I am
    > not sure of the fidelity of the internal clock used by Labview. My idea was
    > that the fastest way to control the fidelity of the internal clock is to add
    > a little part in my prog where Labview ask to any server the time, for
    > example by a TCP or by any other way.
    >
    > Thank you very much to any user answered.


  11. Re: A question

    Unruh wrote:
    > on your own system "accurate". (Note that AFAIK windows does not keep time
    > to any better than about 1/10 of a sec. You cannot read it to msec. Note


    Windows resolution is almost an order of magnitude better than this
    (about 16ms), although still worse than any modern Unix.

  12. Re: A question

    "Bruno Cocciaro" writes:

    >"Hal Murray" wrote in message
    >newsZOdnYCQicMrLoXVnZ2dnUVZ_tninZ2d@megapath.net...


    >> If you are happy with binary results (rather than a string)
    >> you could use NTP. (Don't forget to consider time zones.)


    >Yes, binary results may be good. But I am not able to get this result. I
    >installed any progs, for example Dimension 4, which connect to any server
    >and syncronize my pc clock, but this is not what I want.
    >My problem is this: I run a Labview program which repeat several
    >measurements (for example 10^6 measurements, 0.1 sec for each one). Labview
    >prog uses an internal clock which says each measurement is 0.100 s, but I


    I suspect that the only clock they use is the computer clock. Ie, they do
    not have any special onboard hardware clock.

    On Linux
    date +"%s.%N"
    will give the seconds and nanosecods since Jan1 1970. (well not really
    since leap seconds are ignored)
    But for your purposes unless you run the experiment across a leap second,
    that does not matter.

    Windows is more difficult. There is undoubtedly some equivalent command.
    But Windows does not time to better than about .1 sec anyway.


    will give you the seconds since
    >need to know the instant at which prog performs the first measurement and I
    >must check that after 10^6 mesurements 1000??.??? seconds was spent. I am
    >not sure of the fidelity of the internal clock used by Labview. My idea was
    >that the fastest way to control the fidelity of the internal clock is to add
    >a little part in my prog where Labview ask to any server the time, for
    >example by a TCP or by any other way.


    >Thank you very much to any user answered.
    >--
    >Bruno Cocciaro
    >--- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    >--- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    >--- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)




  13. Re: A question

    "David Woolley" wrote in message
    news:4818f5eb$0$657$5a6aecb4@news.aaisp.net.uk...

    > Getting the time at the time that the server constructed the return
    > packet is a fairly trivial bit of programming; just formulate an NTP
    > client packet, and read the response. You ought to comply with the SNTP
    > rules for clients, but they are fairly easy.


    Sorry but I am really very new on all these thinghs.
    What does it mean "formulate an NTP client packet" ?
    Inside Windows I open the command window and what I must digit ?
    Or, where should I read a possibly simple explanation of the key points on
    this subject ?

    > However, it is unlikely that you actually want that time. It is more
    > likely that you want the time either at which you launched the enquiry,


    yes, I want this time

    > or at the time the reply returned to you, and you want that even if you
    > don't accurately no the network propagation delay. Quite honestly, the
    > easiest way of achieving that is to use a time synchronisation protocol,
    > pure NTP or chrony with NTP wire formats, for example, to discipline
    > the local software clock and then to read the local software clock.


    Are you meaning that the easist way is to keep my pc clock synchronized (for
    example using Dimension 4) and send the enquiry to my pc clock ?

    Thank you
    --
    Bruno Cocciaro
    --- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    --- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    --- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)



  14. Re: A question

    "Unruh" wrote in message
    news:FwbSj.3521$XI1.401@edtnps91...

    > I suspect that the only clock they use is the computer clock. Ie, they do
    > not have any special onboard hardware clock.


    No no, I'm using a National Insturments boards which has an internal
    counter. For my experiment 1 second is 1 second counted by the NI card.
    Actually my problem is to extimate how much good is the second counted by my
    card.

    > On Linux
    > date +"%s.%N"
    > will give the seconds and nanosecods since Jan1 1970. (well not really
    > since leap seconds are ignored)
    > But for your purposes unless you run the experiment across a leap second,
    > that does not matter.


    sorry for my english but ... what is a leap second ?
    If you mean that my measurement interval is less than 1 second, yes, it
    could be (but the NI card will measure that time). I must know how much good
    is the "second" measured by my NI card because after 10^5, or 10^6
    measurements I must know how much time was spent, and I should know the time
    spent with a precision possibly less that the duration of each mesurement (1
    s, or 0.1 s, or 0.01 s ... depending on how much I will be able to increase
    the performing of my set up)

    Thank you.
    --
    Bruno Cocciaro
    --- Li portammo sull'orlo del baratro e ordinammo loro di volare.
    --- Resistevano. Volate, dicemmo. Continuavano a opporre resistenza.
    --- Li spingemmo oltre il bordo. E volarono. (G. Apollinaire)



  15. Re: A question

    Bruno Cocciaro wrote:

    > Are you meaning that the easist way is to keep my pc clock synchronized (for
    > example using Dimension 4) and send the enquiry to my pc clock ?


    Note, if you are using Windows, the time resolution is rather limited
    (about 16ms, but maybe better with multimedia timers on). If you are
    close enough to a good time server that you can directly read the time
    more accurately than the resolution of the Windows clock, it may be
    better to access it directly, but given the questions you ask, you will
    need the services of a programmer. Tell them to read the TSC before
    making the request and subtract off half the change in its value,
    converted to appropriate units, between the request and the response.

    Don't use Dimension 4, use the reference implementation of ntpd. As far
    as I know, Dimension 4 isn't open source, so it will be difficult to
    work out how it works, but it is not going to be better than the
    reference implementation, and is probably worse.

    If you need better than 16ms, you might be able to query a copy of the
    reference implementation of ntpd, running on the same machine, as that
    keeps time to better than 16ms, but you would probably be better running
    a Unix/Free BSD/Linux machine on the same LAN segment.
    >


  16. Re: A question

    Bruno Cocciaro wrote:

    > sorry for my english but ... what is a leap second ?


    The average length of a day isn't exactly 86400 seconds. It varies,
    somewhat randomly, but recently has been a little longer than 86400
    seconds. When the discrepancy between 00:00:00 UTC and solar midnight
    (nominally at Greenwich, and the definition of midnight is probably more
    complex than this) significantly exceeds half a second, at the next
    convenient appropriate time (commonly the end of June or December),
    23:59:58.9999999999999999... is immediately followed by 00:00:00, or
    23:59:59.99999.... is immediately followed by 23:59:60, and continues up
    to 23:59:60.9999..... before going to 00:00:00, depending on the
    direction of the correction. These are leap seconds.

    NTP time is based on UTC time, so will have an upset, especially for
    inserted leap seconds, across the leap second.

    GPS time does not have leap seconds, but GPS does transmit leap second
    information, so that GPS receivers can present UTC time to users.

  17. Re: A question

    Bruno Cocciaro wrote:
    []
    >
    > sorry for my english but ... what is a leap second ?


    Bruno, see:

    http://en.wikipedia.org/wiki/Leap_second

    in addition to David Woolley's reply.

    Cheers,
    David



  18. Re: A question

    Bruno Cocciaro wrote:
    []
    > No no, I'm using a National Insturments boards which has an internal
    > counter. For my experiment 1 second is 1 second counted by the NI
    > card. Actually my problem is to extimate how much good is the second
    > counted by my card.


    How accurately do you need to do this? Is this a one-off measurement just
    to test the accuracy of the clock on the NI board? Is that a separate
    oscillator, or one driver from one of the computer clock lines? My guess
    is that it will be a separate clock.

    Cheers,
    David



  19. Re: A question

    >How accurately do you need to do this? Is this a one-off measurement just
    >to test the accuracy of the clock on the NI board? Is that a separate
    >oscillator, or one driver from one of the computer clock lines? My guess
    >is that it will be a separate clock.


    It might be running off the PCI clock. An inspection of the card
    could detect other crystals/oscillators.


    --
    These are my opinions, not necessarily my employer's. I hate spam.


  20. Re: A question

    Hal Murray wrote:
    >> How accurately do you need to do this? Is this a one-off
    >> measurement just to test the accuracy of the clock on the NI board?
    >> Is that a separate oscillator, or one driver from one of the
    >> computer clock lines? My guess is that it will be a separate clock.

    >
    > It might be running off the PCI clock. An inspection of the card
    > could detect other crystals/oscillators.


    It might, but if I were designing an analog card (I guess that is what
    this is) there is no way I would trust the PC's clocks!

    Cheers,
    David



+ Reply to Thread