hwclock or adjtimex? - Redhat

This is a discussion on hwclock or adjtimex? - Redhat ; I'd like to get the clock on my linux system more accurate. It looks like hwclock will do this. However, there's this other command, adjtimex, that seems to do something similar. 1. Does it pre-date the existence of hwclock? 2. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: hwclock or adjtimex?

  1. hwclock or adjtimex?

    I'd like to get the clock on my linux system more accurate. It looks like
    hwclock will do this. However, there's this other command, adjtimex, that
    seems to do something similar. 1. Does it pre-date the existence of
    hwclock? 2. Is it in some way better than hwclock? 3. It looks to me to
    protect the accuracy of the clock from a crash that it is necessary to run
    a cron job every so often, 1 hour, say, to write the sw clock to the hw
    clock, right?

    --
    Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
    (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
    Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet

    Most vehicle/deer accidents occur at sunset.
    Vehicle deer whistles are ineffective.

    Web Page:


  2. Re: hwclock or adjtimex?

    W. Wat son wrote:
    > I'd like to get the clock on my linux system more accurate. It looks
    > like hwclock will do this. However, there's this other command,
    > adjtimex, that seems to do something similar. 1. Does it pre-date the
    > existence of hwclock? 2. Is it in some way better than hwclock? 3. It
    > looks to me to protect the accuracy of the clock from a crash that it is
    > necessary to run a cron job every so often, 1 hour, say, to write the sw
    > clock to the hw clock, right?
    >

    I run this every 3 hour, and the server itself is updated by running ntpd.

    #!/bin/sh
    if [ -x /sbin/hwclock ]
    then
    /sbin/hwclock --adjust
    /sbin/hwclock --systohc --utc
    fi
    exit 0

  3. Re: hwclock or adjtimex?

    On Fri, 28 Jan 2005 09:40:29 +0100, Sverre Larsson thoughtfully wrote:

    > W. Wat son wrote:
    >> I'd like to get the clock on my linux system more accurate. It looks
    >> like hwclock will do this. However, there's this other command,
    >> adjtimex, that seems to do something similar. 1. Does it pre-date the
    >> existence of hwclock? 2. Is it in some way better than hwclock? 3. It
    >> looks to me to protect the accuracy of the clock from a crash that it is
    >> necessary to run a cron job every so often, 1 hour, say, to write the sw
    >> clock to the hw clock, right?
    >>

    > I run this every 3 hour, and the server itself is updated by running ntpd.
    >
    > #!/bin/sh
    > if [ -x /sbin/hwclock ]
    > then
    > /sbin/hwclock --adjust
    > /sbin/hwclock --systohc --utc
    > fi
    > exit 0


    To the root crontab I added:

    00 5 1-31/2 * * /sbin/rdate -s time.nist.gov

    to set the system clock every other day



+ Reply to Thread