hwclock, date, and other musings. - Linux

This is a discussion on hwclock, date, and other musings. - Linux ; I'm having an issue with the date/time on my server and am hoping for some insight. To make a long story short... the time from "hwclock -r" and "date" are diverging. hwclock seems to be correct but date is slow ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: hwclock, date, and other musings.

  1. hwclock, date, and other musings.

    I'm having an issue with the date/time on my server and am hoping for
    some insight.

    To make a long story short...

    the time from "hwclock -r" and "date" are diverging. hwclock seems to
    be correct but date is slow (and getting slower)... My last check
    showed that the difference went from 10 seconds to 1:20 seconds in 2
    minutes.

    Does anyone have any exerience with this?

    Thanks in advance,
    Rich

  2. Re: hwclock, date, and other musings.

    ramius@rogers.com (Rich) wrote in message news:<7fec30a6.0311121133.594ee766@posting.google.com>...
    > I'm having an issue with the date/time on my server and am hoping for
    > some insight.
    >
    > To make a long story short...
    >
    > the time from "hwclock -r" and "date" are diverging. hwclock seems to
    > be correct but date is slow (and getting slower)... My last check
    > showed that the difference went from 10 seconds to 1:20 seconds in 2
    > minutes.
    >
    > Does anyone have any exerience with this?
    >
    > Thanks in advance,
    > Rich


    Well... after no response I decided to google around a bit more... and
    low and behold I found an answer.

    To make a long story short it looks like a hardware problem... coming
    from a software guy I'm not surprised

    Cheers,
    Rich

  3. Re: hwclock, date, and other musings.

    Rich shaped electrons to say:
    > ramius@rogers.com (Rich) wrote in message news:<7fec30a6.0311121133.594ee766@posting.google.com>...
    >> I'm having an issue with the date/time on my server and am hoping for
    >> some insight.
    >>
    >> To make a long story short...
    >>
    >> the time from "hwclock -r" and "date" are diverging. hwclock seems to
    >> be correct but date is slow (and getting slower)... My last check
    >> showed that the difference went from 10 seconds to 1:20 seconds in 2
    >> minutes.
    >>
    >> Does anyone have any exerience with this?
    >>
    >> Thanks in advance,
    >> Rich

    >
    > Well... after no response I decided to google around a bit more... and
    > low and behold I found an answer.
    >
    > To make a long story short it looks like a hardware problem... coming
    > from a software guy I'm not surprised


    The "ntp" package (Network Time Protocol) provides a solution for drifting
    clocks.

  4. Re: hwclock, date, and other musings.

    Rich wrote:
    > I'm having an issue with the date/time on my server and am hoping for
    > some insight.
    >
    > To make a long story short...
    >
    > the time from "hwclock -r" and "date" are diverging. hwclock seems to
    > be correct but date is slow (and getting slower)... My last check
    > showed that the difference went from 10 seconds to 1:20 seconds in 2
    > minutes.
    >
    > Does anyone have any exerience with this?


    hwclock(8) interacts with the hardware clock. The hardware clock is a clock
    implemented in hardware, and it's timekeeping accuracy is only affected by
    it's power supply and the deliberate interactions of programs like hwclock(8).

    OTOH, date(1) interacts with the software clock implemented by the Linux
    kernel. The software clock is a clock implemented in software, and it's
    timekeeping accuracy is affected by system load, the availability and
    frequency of interrupts, and the deliberate interactions of programs like
    date(1).

    The software clock will loose time when clock interrupts are lost. Clock
    interrupts are lost when
    - your machine goes into "sleep" state, or
    - higher priority interrupts take longer than one clock tick to execute, or
    - physical I/O (top level device drivers) disable interrupts
    So, burning CDs, "sleeping" your system, or heavy disk or network I/O will
    all cause the software clock to loose time.

    You should periodically correct your sw clock against your hw clock (and/or
    a good external clock standard) as part of general operations if you are
    going to run your system for an extended period of time.

    --
    Lew Pitcher

    Master Codewright and JOAT-in-training
    Registered Linux User #112576 (http://counter.li.org/)
    Slackware - Because I know what I'm doing.


  5. Re: hwclock, date, and other musings.

    On Fri, 14 Nov 2003 08:23:26 -0800, Rich wrote:

    > ramius@rogers.com (Rich) wrote in message news:<7fec30a6.0311121133.594ee766@posting.google.com>...
    >> I'm having an issue with the date/time on my server and am hoping for
    >> some insight.
    >>
    >> To make a long story short...
    >>
    >> the time from "hwclock -r" and "date" are diverging. hwclock seems to
    >> be correct but date is slow (and getting slower)... My last check
    >> showed that the difference went from 10 seconds to 1:20 seconds in 2
    >> minutes.
    >>
    >> Does anyone have any exerience with this?
    >>
    >> Thanks in advance,
    >> Rich

    >
    > Well... after no response I decided to google around a bit more... and
    > low and behold I found an answer.
    >
    > To make a long story short it looks like a hardware problem... coming
    > from a software guy I'm not surprised
    >
    > Cheers,
    > Rich


    Uhm what about Lew's response.

    Just use ntp. You can read the RFC and man page.

    Here is my fav time server: time.nrc.ca

    Good Luck
    --
    GNU/Linux is God
    get used to it
    declinton@sympatico.ca
    Linux User # 276385


  6. Re: hwclock, date, and other musings.

    On 12 Nov 2003 11:33:15 -0800, ramius@rogers.com (Rich) wrote:

    >I'm having an issue with the date/time on my server and am hoping for
    >some insight.
    >
    >To make a long story short...
    >
    >the time from "hwclock -r" and "date" are diverging. hwclock seems to
    >be correct but date is slow (and getting slower)... My last check
    >showed that the difference went from 10 seconds to 1:20 seconds in 2
    >minutes.
    >
    >Does anyone have any exerience with this?
    >
    >Thanks in advance,
    >Rich



    I just saw this, hope the OP is still here -

    What you're encountering is a basic design flaw in the PC
    architecture. When disk IO occurs, interrupts are shut off. When
    interrupts are shut off, the clock stops. it happens about a
    millisecond at a time, but it adds up. The problem first surfaces in
    DOS 3.x and lives on.

    The solution is to use an NTP client.

    Mike-

    Mornings: Evolution in action. Only the grumpy will survive.
    -----------------------------------------------------

    Please note - Due to the intense volume of spam, we have
    installed site-wide spam filters at catherders.com. If
    email from you bounces, try non-HTML, non-encoded,
    non-attachments.


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

+ Reply to Thread