9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] incorrect system time
@ 2006-11-25  2:59 Myron Cheung
  2006-11-25  3:13 ` ron minnich
  2006-11-26 16:23 ` Russ Cox
  0 siblings, 2 replies; 6+ messages in thread
From: Myron Cheung @ 2006-11-25  2:59 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 915 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] incorrect system time
  2006-11-25  2:59 [9fans] incorrect system time Myron Cheung
@ 2006-11-25  3:13 ` ron minnich
  2006-11-25  3:24   ` Myron Cheung
  2006-11-26 16:23 ` Russ Cox
  1 sibling, 1 reply; 6+ messages in thread
From: ron minnich @ 2006-11-25  3:13 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/24/06, Myron Cheung <onyx.peridot@gmail.com> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] incorrect system time
  2006-11-25  3:13 ` ron minnich
@ 2006-11-25  3:24   ` Myron Cheung
  0 siblings, 0 replies; 6+ messages in thread
From: Myron Cheung @ 2006-11-25  3:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

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 <rminnich@gmail.com> wrote:
>
> On 11/24/06, Myron Cheung <onyx.peridot@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 1534 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] incorrect system time
  2006-11-25  2:59 [9fans] incorrect system time Myron Cheung
  2006-11-25  3:13 ` ron minnich
@ 2006-11-26 16:23 ` Russ Cox
  2006-11-26 21:19   ` Myron Cheung
  1 sibling, 1 reply; 6+ messages in thread
From: Russ Cox @ 2006-11-26 16:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] incorrect system time
  2006-11-26 16:23 ` Russ Cox
@ 2006-11-26 21:19   ` Myron Cheung
  2006-11-26 22:18     ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Myron Cheung @ 2006-11-26 21:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

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 <rsc@swtch.com> 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
>

[-- Attachment #2: Type: text/html, Size: 1070 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] incorrect system time
  2006-11-26 21:19   ` Myron Cheung
@ 2006-11-26 22:18     ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2006-11-26 22:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-11-26 22:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-25  2:59 [9fans] incorrect system time Myron Cheung
2006-11-25  3:13 ` ron minnich
2006-11-25  3:24   ` Myron Cheung
2006-11-26 16:23 ` Russ Cox
2006-11-26 21:19   ` Myron Cheung
2006-11-26 22:18     ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).