drift file set to -500 - NTP

This is a discussion on drift file set to -500 - NTP ; After running NTPD on VxWorks for a couple days, the ntp.drift file was set to -500, that made it jump to the infinite loop trying to call adjtime(), but VxWorks doesn't have adjtime(). I read the ntp documentation. It suggests ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 38

Thread: drift file set to -500

  1. drift file set to -500

    After running NTPD on VxWorks for a couple days, the ntp.drift file
    was set to -500, that made it jump to the infinite loop trying to call
    adjtime(), but VxWorks doesn't have adjtime().

    I read the ntp documentation. It suggests to disable the time-of-year
    (TOY) clock chip. How do I disable this clock chip??

    Have anyone seen this "-500" error before? How did you resolve this?

    Any advice help,

    Thanks
    Kev

  2. Re: drift file set to -500

    Aggie wrote:
    > After running NTPD on VxWorks for a couple days, the ntp.drift file
    > was set to -500, that made it jump to the infinite loop trying to call
    > adjtime(), but VxWorks doesn't have adjtime().
    >
    > I read the ntp documentation. It suggests to disable the time-of-year
    > (TOY) clock chip. How do I disable this clock chip??
    >
    > Have anyone seen this "-500" error before? How did you resolve this?
    >
    > Any advice help,
    >
    > Thanks
    > Kev


    500 PPM is the maximum frequency error that ntpd can compensate for.
    Typical computer clocks exhibit an error of 25 to 100 PPM. The fact
    that your drift file contains -500 strongly suggests a severe hardware
    problem with your clock! How much does it lose or gain per day when
    ntpd is not running?


  3. Re: drift file set to -500

    Aggie wrote:
    > After running NTPD on VxWorks for a couple days, the ntp.drift file
    > was set to -500, that made it jump to the infinite loop trying to call
    > adjtime(), but VxWorks doesn't have adjtime().
    >
    > I read the ntp documentation. It suggests to disable the time-of-year
    > (TOY) clock chip. How do I disable this clock chip??
    >
    > Have anyone seen this "-500" error before? How did you resolve this?
    >
    > Any advice help,
    >
    > Thanks
    > Kev


    Kev,

    I've seen something similar under Windows - known good hardware with drift
    values from 10 to 100. Suddenly, NTP becomes confused, and sets the drift
    value to a an extreme (+/- 496, for example, I don't recall plus or
    minus), and cannot recover from it. You need to delete the drift file, or
    enter a near correct value.

    Of course, as Richard says, it could be a hardware issue, or it could be
    something in NTP. What happens if you delete the drift file and leave it
    for a few hours?

    Cheers,
    David



  4. Re: drift file set to -500

    I don't know how much it lose/gain per day yet. I will run it
    overnight today. If it is indeed a hardware problem, how can I fix it?
    If it is not, what other problem may it be? I saw someone in the forum
    who could resolve this problem by changing the HZ varilable in the
    kernel to 250. But his original value was 1000 and mine is 60. I don't
    believe we have the same problem. have anyone else experience the same
    error? How did you fix it?

    Thanks,
    Kev

  5. Re: drift file set to -500

    On Nov 26, 10:54 pm, "David J Taylor" this-bit.nor-this-bit.co.uk> wrote:
    > Aggie wrote:
    > > After running NTPD on VxWorks for a couple days, the ntp.drift file
    > > was set to -500, that made it jump to the infinite loop trying to call
    > > adjtime(), but VxWorks doesn't have adjtime().

    >
    > > I read the ntp documentation. It suggests to disable the time-of-year
    > > (TOY) clock chip. How do I disable this clock chip??

    >
    > > Have anyone seen this "-500" error before? How did you resolve this?

    >
    > > Any advice help,

    >
    > > Thanks
    > > Kev

    >
    > Kev,
    >
    > I've seen something similar under Windows - known good hardware with drift
    > values from 10 to 100. Suddenly, NTP becomes confused, and sets the drift
    > value to a an extreme (+/- 496, for example, I don't recall plus or
    > minus), and cannot recover from it. You need to delete the drift file, or
    > enter a near correct value.
    >


    David,
    > Delete the drift file??

    Did you leave ntp running when u deleted the drift file or did you
    restart ntp after u delete the drift file?

    > near correct value??

    What is a near correct value?? How do I find out what's the correct
    value for my hardware?

    > Of course, as Richard says, it could be a hardware issue, or it could be
    > something in NTP. What happens if you delete the drift file and leave it
    > for a few hours?


    I will try that.

    Thanks,
    Kev.

  6. Re: drift file set to -500

    On 2007-11-27, Aggie wrote:

    > On Nov 26, 10:54 pm, "David J Taylor" wrote:
    >
    >> Delete the drift file??

    >
    > Did you leave ntp running when [you] deleted the drift file or did you
    > restart ntp after [you] delete the drift file?


    Restart ntpd after deleting the drift file.

    This forces ntpd to recalculate the approximately frequency correction
    value for your hardware.

    >> near correct value??

    >
    > What is a near correct value?? How do I find out what's the correct
    > value for my hardware?


    Take a look in your drift file after ntpd settles down.

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

  7. Re: drift file set to -500

    Aggie wrote:
    > I don't know how much it lose/gain per day yet. I will run it
    > overnight today. If it is indeed a hardware problem, how can I fix it?


    If the hardware is under warranty, you ask the vendor to fix it! If
    not, you have a problem! If it's a PC more than three years old,
    consider replacing it! PCs will usually last a lot longer than three
    years but technology moves so fast that three years is almost synonymous
    with hopeless obsolescence!




  8. Re: drift file set to -500

    On 2007-11-27, Aggie wrote:

    > I don't know how much it lose/gain per day yet. I will run it
    > overnight today. If it is indeed a hardware problem, how can I fix it?


    The frantically shouted phrase "hardware problem!" can, in reality,
    refer to a wide range of issues.

    If your clock runs consistantly in one direction (i.e. too fast _or_ too
    slow), you may just need to adjust your kernel tick value to bring the
    rate of change within the +-500PPM window.

    > If it is not, what other problem may it be? I saw someone in the forum
    > who could resolve this problem by changing the HZ varilable in the
    > kernel to 250. But his original value was 1000 and mine is 60.


    That case involved a Linux kernel.

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

  9. Re: drift file set to -500

    Aggie wrote:
    []
    > Did you leave ntp running when u deleted the drift file or did you
    > restart ntp after u delete the drift file?
    >
    >> near correct value??

    > What is a near correct value?? How do I find out what's the correct
    > value for my hardware?
    >
    >> Of course, as Richard says, it could be a hardware issue, or it
    >> could be something in NTP. What happens if you delete the drift
    >> file and leave it for a few hours?

    >
    > I will try that.
    >
    > Thanks,
    > Kev.


    Steve provided the correct answers.

    Thanks.

    David



  10. Re: drift file set to -500


    >Restart ntpd after deleting the drift file.


    I think some version of ndpd used to write out the drift file
    when it exited. (Maybe I'm dreaming and that was just a
    suggestion for purposes of discussion.)

    So I would do
    stop ntpd
    delete the drift file
    start ntpd

    Then you know it got deleted.

    An alternative would be
    delete drift file
    restart ntpd
    check to make sure drift file is not there

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


  11. Re: drift file set to -500

    Hal Murray wrote:
    >> Restart ntpd after deleting the drift file.

    >
    > I think some version of ndpd used to write out the drift file
    > when it exited. (Maybe I'm dreaming and that was just a
    > suggestion for purposes of discussion.)
    >
    > So I would do
    > stop ntpd
    > delete the drift file
    > start ntpd
    >
    > Then you know it got deleted.
    >
    > An alternative would be
    > delete drift file
    > restart ntpd
    > check to make sure drift file is not there
    >


    Yes. And one missing step:

    After stopping ntpd, "ntpdate -b [server]".

    The single most common cause of a large negative drift value
    is a system whose clock has not been initialized before starting
    ntpd (or has been stopped during a large time adjustment).

    -Tom

  12. Re: drift file set to -500

    On 2007-11-28, Tom Smith wrote:

    > Yes. And one missing step:
    >
    > After stopping ntpd, "ntpdate -b [server]".


    ntpdate is deprecated and no longer maintained.

    'ntpq -gq' is the suggested replacement using ntpd.

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

  13. Re: drift file set to -500

    Steve Kostecke wrote:
    > On 2007-11-28, Tom Smith wrote:
    >
    >> Yes. And one missing step:
    >>
    >> After stopping ntpd, "ntpdate -b [server]".

    >
    > ntpdate is deprecated and no longer maintained.
    >
    > 'ntpq -gq' is the suggested replacement using ntpd.
    >


    And wait until it finishes, of course. Or use ntpdate
    and proceed immediately.


  14. Re: drift file set to -500

    On 2007-11-28, Tom Smith wrote:

    > Steve Kostecke wrote:
    >
    >> On 2007-11-28, Tom Smith wrote:
    >>
    >> ntpdate is deprecated and no longer maintained.
    >>
    >> 'ntpq -gq' is the suggested replacement using ntpd.

    >
    > And wait until it finishes, of course.


    # time ntpd -gq
    ntpd: time slew -0.000121s

    real 0m7.053s
    user 0m0.020s
    sys 0m0.028s

    (using my ISP's time server located at least 15 hops from here)

    > and proceed immediately.


    ntpdate is deprecated and no longer maintained. It is known to set the
    clock incorrectly in certain circumstances.

    Save the 6 seconds if you wish ...

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

  15. Re: drift file set to -500

    Steve Kostecke wrote:
    > On 2007-11-28, Tom Smith wrote:
    >
    >> Steve Kostecke wrote:
    >>
    >>> On 2007-11-28, Tom Smith wrote:
    >>>
    >>> ntpdate is deprecated and no longer maintained.
    >>>
    >>> 'ntpq -gq' is the suggested replacement using ntpd.

    >> And wait until it finishes, of course.

    >
    > # time ntpd -gq
    > ntpd: time slew -0.000121s
    >
    > real 0m7.053s
    > user 0m0.020s
    > sys 0m0.028s
    >
    > (using my ISP's time server located at least 15 hops from here)
    >
    >> and proceed immediately.

    >
    > ntpdate is deprecated and no longer maintained. It is known to set the
    > clock incorrectly in certain circumstances.
    >
    > Save the 6 seconds if you wish ...
    >


    Leaving aside the hand waves, OP would probably find it
    useful to have the complete repair procedure documented.

    Alternative A
    -------------
    Stop ntpd
    Run "ntpdate -b [server]"
    Delete the drift file
    Start ntpd
    Let it run for a day or 2

    Alternative B (may not be available, depending on the ntpd version installed)
    -----------------------------------------------------------------------------
    Construct a second ntp.conf for use by ntpd -gq
    Details left as an exercise to the reader - multiple servers, iburst, etc.
    Stop ntpd
    Delete the drift file
    Run "ntpd -gq -c [configuration file]
    Wait for completion
    Delete the drift file, if any
    Start ntpd
    Let it run for a day or 2

  16. Re: drift file set to -500

    David,
    > What happens if you delete the drift file and leave it for a few hours?


    After I deleted the drift file and left it run overnight, the drift
    file was not created in the first couple hours and when I checked this
    morning. ntp.drift and ntp.drift.TEMP were created. ntp.drift couldn't
    be opened because ntp was using it. ntp.drifti.TEMP had a value of
    +500. And NTPD is still running. But I believe NTPD will stop
    eventually, same as what happened before.

    Thanks,
    Kev.


  17. Re: drift file set to -500

    Richard.

    > If the hardware is under warranty, you ask the vendor to fix it! If
    > not, you have a problem! If it's a PC more than three years old,
    > consider replacing it! PCs will usually last a lot longer than three
    > years but technology moves so fast that three years is almost synonymous
    > with hopeless obsolescence!


    I don't think it's a hardware product defect. Because we have two of
    them, and we had run the same test on both of the board, we still got
    the same error. Thanks,
    Kev.

  18. Re: drift file set to -500

    Steve,

    > Restart ntpd after deleting the drift file.


    I did that. But when I ran it overnight, the drift file with 500 was
    created, (but the ntp was still running). Last time when I ran it for
    3 days, the drift file had a value of -500 in the end, and ntp had
    stopped sync-ing the clock on the client and no stats file stopped
    updating.

    >
    > >> near correct value??

    >
    > > What is a near correct value?? How do I find out what's the correct
    > > value for my hardware?

    >
    > Take a look in your drift file after ntpd settles down.


    How do I tell if ntpd settles down??

    Thanks,
    Kev.

  19. Re: drift file set to -500

    Aggie wrote:
    > David,
    >> What happens if you delete the drift file and leave it for a few
    >> hours?

    >
    > After I deleted the drift file and left it run overnight, the drift
    > file was not created in the first couple hours and when I checked this
    > morning. ntp.drift and ntp.drift.TEMP were created. ntp.drift couldn't
    > be opened because ntp was using it. ntp.drifti.TEMP had a value of
    > +500. And NTPD is still running. But I believe NTPD will stop
    > eventually, same as what happened before.
    >
    > Thanks,
    > Kev.


    That sounds like a permissions error. I did see something similar in
    Windows some time back. On Windows, at least, you can read the ntp.drift
    file almost any time.

    Cheers,
    David



  20. Re: drift file set to -500

    David,

    > That sounds like a permissions error. I did see something similar in
    > Windows some time back. On Windows, at least, you can read the ntp.drift
    > file almost any time.


    Thank you very much. But I don't think it is a permission error,
    because I'm using "target server" thing which allow me to connect to a
    PC from my board, and then read and write files to the PC.

    Cheers,
    Kev.


    >
    > Cheers,
    > David



+ Reply to Thread
Page 1 of 2 1 2 LastLast