[9fans] incorrect system time - Plan9

This is a discussion on [9fans] incorrect system time - Plan9 ; I downloaded the plan9.iso a few days ago, and when I load it up in qemu, the system time is off by more than 6 years. However, I never had this problem when I ran an older version of plan9 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: [9fans] incorrect system time

  1. [9fans] incorrect system time

    I downloaded the plan9.iso a few days ago, and when I load it up in qemu,
    the system time is off by more than 6 years. However, I never had this
    problem when I ran an older version of plan9 (about 3 years older). I
    searched through the archive of 9fans, and there were some mention of a
    similar clock drift problem on other platforms. Anyways, I checked /dev/rtc
    and /dev/time. It appears that /dev/rtc is correct while /dev/time is way
    off. If I do "cat /dev/rtc > /dev/time", the clock gets reset to its
    correct value, but after a few minutes, it reverts back to an incorrect
    value. I just wonder why I never had this problem with the older version of
    plan9. If both versions show similar behavior, I would be more inclined to
    put the blame on qemu.

    I shall much appreciate any insight from a more experienced user of
    developer of plan9.


  2. Re: [9fans] incorrect system time

    On 11/24/06, Myron Cheung wrote:
    > I downloaded the plan9.iso a few days ago, and when I load it up in qemu,
    > the system time is off by more than 6 years. However, I never had this
    > problem when I ran an older version of plan9 (about 3 years older). I
    > searched through the archive of 9fans, and there were some mention of a
    > similar clock drift problem on other platforms. Anyways, I checked /dev/rtc
    > and /dev/time. It appears that /dev/rtc is correct while /dev/time is way
    > off. If I do "cat /dev/rtc > /dev/time", the clock gets reset to its
    > correct value, but after a few minutes, it reverts back to an incorrect
    > value.


    I am still seeing the same problem. I think I fixed this in Xen by
    taking the clock interrupt but always picking up the value of the time
    from the rtc, but I am not sure. But there is definitely a problem
    here.

    ron

  3. Re: [9fans] incorrect system time

    By the way, I also tried the most recent version of plan9.iso on a Dell PC
    (celeron 2.8GHZ), the clock comes up correct.

    On 11/25/06, ron minnich wrote:
    >
    > On 11/24/06, Myron Cheung wrote:
    > > I downloaded the plan9.iso a few days ago, and when I load it up in

    > qemu,
    > > the system time is off by more than 6 years. However, I never had this
    > > problem when I ran an older version of plan9 (about 3 years older). I
    > > searched through the archive of 9fans, and there were some mention of a
    > > similar clock drift problem on other platforms. Anyways, I checked

    > /dev/rtc
    > > and /dev/time. It appears that /dev/rtc is correct while /dev/time is

    > way
    > > off. If I do "cat /dev/rtc > /dev/time", the clock gets reset to its
    > > correct value, but after a few minutes, it reverts back to an incorrect
    > > value.

    >
    > I am still seeing the same problem. I think I fixed this in Xen by
    > taking the clock interrupt but always picking up the value of the time
    > from the rtc, but I am not sure. But there is definitely a problem
    > here.
    >
    > ron
    >



  4. Re: [9fans] incorrect system time

    The reason the time gets set back is that
    aux/timesync is managing /dev/time. If you change
    /dev/time behind its back, it will gladly "fix" it next
    time it checks.

    Timesync is started in termrc. It looks to me like
    it should by default be syncing against /dev/rtc,
    but run psu -a |grep timesync and check that it is
    really running with the -r flag.

    If it is, perhaps there is a bug in timesync that
    needs to be found.

    Russ

  5. Re: [9fans] incorrect system time

    psu -a | grep timesync does not show the -r flag.

    I killed timesync and ran it manually with the -r flag again, but psu -a
    does not show the -r flag. In termrc, timesync was started with
    TIMESYNCARGS=-rLa1000000 .

    Myron

    On 11/26/06, Russ Cox wrote:
    >
    > The reason the time gets set back is that
    > aux/timesync is managing /dev/time. If you change
    > /dev/time behind its back, it will gladly "fix" it next
    > time it checks.
    >
    > Timesync is started in termrc. It looks to me like
    > it should by default be syncing against /dev/rtc,
    > but run psu -a |grep timesync and check that it is
    > really running with the -r flag.
    >
    > If it is, perhaps there is a bug in timesync that
    > needs to be found.
    >
    > Russ
    >



  6. Re: [9fans] incorrect system time

    My mistake -- psu -a won't help. I forgot that timesync
    forks itself into the background, and forked children don't
    keep the exec arguments in the ps listing.

    Russ

+ Reply to Thread