ntpdate - NTP

This is a discussion on ntpdate - NTP ; I use ntpdate command in crond to synchronize local clock of my Linux servers. I run ntpdate -B -s ntp1.ien.it ntp2.ien.it 1- NTP algorithm will choose best time, so is't possible client retrieves time from ntp1 server or ntp2 ? ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: ntpdate

  1. ntpdate

    I use ntpdate command in crond to synchronize local clock of my Linux
    servers.
    I run ntpdate -B -s ntp1.ien.it ntp2.ien.it

    1- NTP algorithm will choose best time, so is't possible client
    retrieves time from ntp1 server or ntp2 ? Can you confirm me this
    behaviour ?
    2- Does it exist way to retrieve time ALWAYS from same server (for
    example ntp1) and only if it is not available gets time from second
    server (ntp2) ?


  2. Re: ntpdate

    Well, using ntpdate will always "step" your PC clock, so you can count on it jerking
    forward and back at each chron interval. So I'm not sure how it would help to always
    use the same server, it will still hop around even from one server. And, ntpdate I
    believe has been "deprecated" and is no longer being enhanced or supported.

    What you really want is somehow to reach out to several servers, get an approximation
    of the correct time by consensus, then slowly steer the PC clock to match it. No
    steps, no dependency on a particular server.

    This is what the reference implementation of NTP does. It's called NTPD. I'd give
    that a try.

    - Eric

    On 28 Mar 2007 02:50:11 -0700, "RICCARDO" wrote for
    the entire planet to see:

    >I use ntpdate command in crond to synchronize local clock of my Linux
    >servers.
    >I run ntpdate -B -s ntp1.ien.it ntp2.ien.it
    >
    >1- NTP algorithm will choose best time, so is't possible client
    >retrieves time from ntp1 server or ntp2 ? Can you confirm me this
    >behaviour ?
    >2- Does it exist way to retrieve time ALWAYS from same server (for
    >example ntp1) and only if it is not available gets time from second
    >server (ntp2) ?



  3. Re: ntpdate

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Replying to message

    > Well, using ntpdate will always "step" your PC clock, so you can
    > count on it jerking forward and back at each chron interval.
    >


    Not to be picky, but according to my copy of the man page, the -B option
    will "force the time to always be slewed using the adjtime() system call,
    even if the offset is greater than +-128ms".

    - --
    Pierre Dubuc
    pldubuc@yahoo.ca
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (NetBSD)

    iEYEARECAAYFAkYKurUACgkQaMA1iJ2qYmLFOQCg5jC8H+DnRl mOATK68lChR0sQ
    nSsAnj6UCtO4UJZGHq3yHH1/CmO0icAa
    =dmKQ
    -----END PGP SIGNATURE-----

  4. Re: ntpdate

    ntpdate is being deprecated.

    Why would you want to use a cron job when you could just run ntpd?

    Please see http://ntp.isc.org/Dev/DeprecatingNtpdate

    H

  5. Re: ntpdate

    I guess you got me on that one. I don't actually use ntpdate. I have read though
    that the -B option could take days or weeks to complete of the time is far enough
    off.


  6. Re: ntpdate

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Replying to message

    > I guess you got me on that one. I don't actually use ntpdate.
    > I have read though that the -B option could take days or weeks
    > to complete of the time is far enough off.
    >


    Indeed, so a potential scenario would be to use -b (always step) in the
    initial invokation at boot time, then -B (always slew) from within cron.

    - --
    Pierre Dubuc
    pldubuc@yahoo.ca
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (NetBSD)

    iEYEARECAAYFAkYK1zkACgkQaMA1iJ2qYmIk4ACeItnXWG3AiX ZGn2HDvS5OxEcp
    AZwAoKpjTO1IawSodLEaVVlhA/53EahC
    =2+47
    -----END PGP SIGNATURE-----

  7. Re: ntpdate

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Replying to message

    >
    > ntpdate is being deprecated.
    >
    > Why would you want to use a cron job when you could just run ntpd?
    >
    > Please see http://ntp.isc.org/Dev/DeprecatingNtpdate
    >


    All right, here is my setup. I use a 486-SX box (sans FPU) with
    NetBSD/i386 as a way to SSH against a NetBSD/macppc machine, which
    provides an awful console. The ntpd on the 486-SX doesn't seem to like a
    kernel that doesn't support, at a minimum, the fsqrt() function.

    See the thread called "ntpd 4.2.4 crash on NetBSD/i386" from
    about a month ago.

    Now, The kernel sources for NetBSD/i386 don't provide an emulation for
    fsqrt(), and I'm not a kernel programmer. Therefore, I can't fix this
    kernel issue, and the nice NetBSD people have better things to do than
    implement obsolete emulations anyway. So, ntpd cannot run on my 486-SX. I
    decided to instead run ntpdate from a cron job and periodically sync the
    box to the ntpd running on the macppc.

    So there. Now laugh if you must, but I like my 486-SX ;-)

    - --
    Pierre Dubuc
    pldubuc@yahoo.ca
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (NetBSD)

    iEYEARECAAYFAkYK2xAACgkQaMA1iJ2qYmKAbQCfWyZeU6vuOP 2EieMxY+T8k7Wk
    tpwAn1HKBlfwbPQ4Nyl8YeSzKSdqHgDf
    =NYEW
    -----END PGP SIGNATURE-----

  8. Re: ntpdate

    "Pierre Dubuc" wrote in message
    news:Pine.NEB.4.64.0703281701180.3992@localhost...
    [...]
    > So there. Now laugh if you must, but I like my 486-SX ;-)


    I'm not laughing. I have two 486s in my attic, and one got bumped
    from being the Internet gateway only because it really couldn't keep
    up with ever faster Internet connections anymore. It's still serving
    IMAP. Slowly.

    Couldn't you scrounge up a 486DX from somewhere? I have some old
    CPUs in the ju^H^Harchive; there may even be one among them.

    Groetjes,
    Maarten Wiltink



  9. Re: ntpdate

    Maarten Wiltink wrote:

    > Couldn't you scrounge up a 486DX from somewhere? I have some old
    > CPUs in the ju^H^Harchive; there may even be one among them.


    I've got a pile somewhere - Pierre, let if you'd like me to send one
    your way.


    /Per Jessen, Z├╝rich

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

  10. Re: ntpdate

    On 28 Mar, 20:23, Eric wrote:
    > Well, using ntpdate will always "step" your PC clock, so you can count on it jerking
    > forward and back at each chron interval. So I'm not sure how it would help to always
    > use the same server, it will still hop around even from one server. And, ntpdate I
    > believe has been "deprecated" and is no longer being enhanced or supported.
    >
    > What you really want is somehow to reach out to several servers, get an approximation
    > of the correct time by consensus, then slowly steer the PC clock to match it. No
    > steps, no dependency on a particular server.
    >
    > This is what the reference implementation of NTP does. It's called NTPD. I'd give
    > that a try.
    >
    > - Eric
    >
    > On 28 Mar 2007 02:50:11 -0700, "RICCARDO" wrote for
    > the entire planet to see:
    >
    >
    >
    > >I use ntpdate command in crond to synchronize local clock of my Linux
    > >servers.
    > >I run ntpdate -B -s ntp1.ien.it ntp2.ien.it

    >
    > >1- NTP algorithm will choose best time, so is't possible client
    > >retrieves time from ntp1 server or ntp2 ? Can you confirm me this
    > >behaviour ?
    > >2- Does it exist way to retrieve time ALWAYS from same server (for
    > >example ntp1) and only if it is not available gets time from second
    > >server (ntp2) ?- Nascondi testo tra virgolette -

    >
    > - Mostra testo tra virgolette -


    I think time offset is very little at every each cron interval; "-B"
    option uses "adjtime" system call which is more soft function to
    adjust time. (it slowly steers pc clock)
    What do you think ?
    I thought to use ntpdate so in this way I have no installed service,
    CPU load is more free and thare are no attacks risk from other
    machines.


  11. Re: ntpdate

    On 28 Mar, 20:23, Eric wrote:
    > Well, using ntpdate will always "step" your PC clock, so you can count on it jerking
    > forward and back at each chron interval. So I'm not sure how it would help to always
    > use the same server, it will still hop around even from one server. And, ntpdate I
    > believe has been "deprecated" and is no longer being enhanced or supported.
    >
    > What you really want is somehow to reach out to several servers, get an approximation
    > of the correct time by consensus, then slowly steer the PC clock to match it. No
    > steps, no dependency on a particular server.
    >
    > This is what the reference implementation of NTP does. It's called NTPD. I'd give
    > that a try.
    >
    > - Eric
    >
    > On 28 Mar 2007 02:50:11 -0700, "RICCARDO" wrote for
    > the entire planet to see:
    >
    >
    >
    > >I use ntpdate command in crond to synchronize local clock of my Linux
    > >servers.
    > >I run ntpdate -B -s ntp1.ien.it ntp2.ien.it

    >
    > >1- NTP algorithm will choose best time, so is't possible client
    > >retrieves time from ntp1 server or ntp2 ? Can you confirm me this
    > >behaviour ?
    > >2- Does it exist way to retrieve time ALWAYS from same server (for
    > >example ntp1) and only if it is not available gets time from second
    > >server (ntp2) ?- Nascondi testo tra virgolette -

    >
    > - Mostra testo tra virgolette -

    I think time offset is very little at every each cron interval; "-B"
    option uses "adjtime" system call which is more soft function to
    adjust time. (it slowly steers pc clock)
    What do you think ?
    I thought to use ntpdate so in this way I have no installed service,
    CPU load is more free and thare are no attacks risk from other
    machines.


  12. Re: ntpdate

    >>> In article , Pierre Dubuc writes:

    Pierre> The ntpd on the 486-SX doesn't seem to like a kernel that doesn't
    Pierre> support, at a minimum, the fsqrt() function.

    I don't see fsqrt() anywhere in the code. Do you mean sqrt()?

    It would go into the math library, not the kernel.

    Have you seen http://www.acm.org/pubs/tog/GraphicsGems/gemsiii/sqrt.c ?

    I suspect you could also find something in (perhaps older) GNU C/math
    libraries.

    I know the current sntp codebase has sqrt() calls in it, and I am not sure
    if we are actually using the areas of the code which make those calls.
    We do need to find somebody do maintain the SNTP code.

    You might also find joy at http://www.projectpluto.com/sat_code.htm, using
    log/exp to produce a square root.

    H


  13. Re: ntpdate

    I think time offset is very little at every each cron interval; "-B" option uses "adjtime" system call which is more soft function to adjust time. (it slowly steers pc clock)
    What do you think ?
    I thought to use ntpdate so in this way I have no installed service, CPU load is more free and thare are no attacks risk from other machines.
    ----- Original Message -----
    From: Eric
    Newsgroups: comp.protocols.time.ntp
    To: questions@lists.ntp.isc.org
    Sent: Wednesday, March 28, 2007 8:23 PM
    Subject: Re: [ntp:questions] ntpdate


    Well, using ntpdate will always "step" your PC clock, so you can count on it jerking
    forward and back at each chron interval. So I'm not sure how it would help to always
    use the same server, it will still hop around even from one server. And, ntpdate I
    believe has been "deprecated" and is no longer being enhanced or supported.

    What you really want is somehow to reach out to several servers, get an approximation
    of the correct time by consensus, then slowly steer the PC clock to match it. No
    steps, no dependency on a particular server.

    This is what the reference implementation of NTP does. It's called NTPD. I'd give
    that a try.

    - Eric

    On 28 Mar 2007 02:50:11 -0700, "RICCARDO" wrote for
    the entire planet to see:

    >I use ntpdate command in crond to synchronize local clock of my Linux
    >servers.
    >I run ntpdate -B -s ntp1.ien.it ntp2.ien.it
    >
    >1- NTP algorithm will choose best time, so is't possible client
    >retrieves time from ntp1 server or ntp2 ? Can you confirm me this
    >behaviour ?
    >2- Does it exist way to retrieve time ALWAYS from same server (for
    >example ntp1) and only if it is not available gets time from second
    >server (ntp2) ?


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


  14. Re: ntpdate

    In article <1175075411.663329.145870@p15g2000hsd.googlegroups. com>,
    RICCARDO wrote:

    > I run ntpdate -B -s ntp1.ien.it ntp2.ien.it


    > 1 - NTP algorithm will choose best time, so is't possible client


    ntpdate doesn't use the NTP algorithm.

    ntpd does, and will use an average of the times from the two servers,
    weighted by the network distance to each.

    > 2- Does it exist way to retrieve time ALWAYS from same server (for
    > example ntp1) and only if it is not available gets time from second
    > server (ntp2) ?


    Why would you want to do this? Both servers are likely to wander
    similarly.

    quit

+ Reply to Thread