[opensuse-factory] wrong system time if no NTP (local hwclock)
1 /etc/adjtime from my 10.2 server: 0.000101 1204753900 0.000000 1204753900 LOCAL /etc/adjtime from the Factory box I was using today: 0.000234 1210343800 0.000000 1210343800 LOCAL Both are multiboot systems with the hardware clock set to local (GMT-0400) time. Why are they different? 2 I've searched Bugzilla, and don't seem to have found anything open on point, unless https://bugzilla.novell.com/show_bug.cgi?id=384254 is it, in which case it needs a much better summary. (No manual entry for nscd). I have NTP (and NSCD) set to start only in runlevels 3 & 5, since in 1 & 2 there is no network. /etc/sysconfig/clock contains HWCLOCK="--localtime", SYSTOHC="yes", TIMEZONE="America/New_York", DEFAULT_TIMEZONE="US/Eastern". When I boot to runlevel 2, the system time has the time zone offset doubled. When GMT is noon, and localtime is 08:00, the system time booted to Factory is 04:00, even though hwclock and hwclock --localtime both correctly show 08:00. Only after upping runlevel to 3 or 5, which starts NTP, is the system time correct. Surely I'm not the only one seeing this. System was last updated around 00:00 local on 09 May. Anyone know which Bugzilla bug this is, and how one would tell? I'm thinking 384254 could be it, because https://bugzilla.novell.com/show_bug.cgi?id=385296#c5 was duped to it, and following the instruction there seems to have eliminated the problem of wrong clock unless NTP is running. But, 384254 is about as clear as mud regarding what it is actually about. -- ". . . . in everything, do to others what you would have them do to you . . . ." Matthew 7:12 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Felix Miata pecked at the keyboard and wrote:
1 /etc/adjtime from my 10.2 server: 0.000101 1204753900 0.000000 1204753900 LOCAL
/etc/adjtime from the Factory box I was using today: 0.000234 1210343800 0.000000 1210343800 LOCAL
Both are multiboot systems with the hardware clock set to local (GMT-0400) time. Why are they different?
Because the electronics in each are not 100% exactly the same so you get some differences in timing. Even two identical machines will have different values, hence the need for NTP. -- Ken Schneider SuSe since Version 5.2, June 1998 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2008-05-10 at 01:39 -0400, Felix Miata wrote:
1 /etc/adjtime from my 10.2 server: 0.000101 1204753900 0.000000 1204753900 LOCAL
/etc/adjtime from the Factory box I was using today: 0.000234 1210343800 0.000000 1210343800 LOCAL
Both are multiboot systems with the hardware clock set to local (GMT-0400) time. Why are they different?
That's normal. The adjtime file serves to keep track of the different speed of the hardware clock (the cmos, battery, clock) when compared with an external source, with the purpose of adjusting for the estimated clock drift when booting the system. It is absolutely normal than different machines have different drifts. Even the same machine when multibooted will have different data: factory, this machine: cer@nimrodel:~> cat /otros/test_d/etc/adjtime 0.308270 1208691242 0.000000 1194859198 UTC 10.3, this same machine: - -0.003739 1210007671 0.000000 1210007671 UTC 10.2, this same machine: - -0.000595 1202391337 0.000000 1202391337 UTC
I have NTP (and NSCD) set to start only in runlevels 3 & 5, since in 1 & 2 there is no network. /etc/sysconfig/clock contains HWCLOCK="--localtime", SYSTOHC="yes", TIMEZONE="America/New_York", DEFAULT_TIMEZONE="US/Eastern".
When I boot to runlevel 2, the system time has the time zone offset doubled. When GMT is noon, and localtime is 08:00, the system time booted to Factory is 04:00, even though hwclock and hwclock --localtime both correctly show 08:00. Only after upping runlevel to 3 or 5, which starts NTP, is the system time correct. Surely I'm not the only one seeing this. System was last updated around 00:00 local on 09 May. Anyone know which Bugzilla bug this is, and how one would tell?
That's a bug. You could check to see if the time is correct in runlevel 3 and 5 with NTP disabled, to make sure. And if you cant ascertain if it has been reported in Bugzilla, doesn't matter, report again: the people there will know. Even if marked as duplicated it serves to calibrate the incidence of a bug. So they told once, at least :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIJZ1DtTMYHG2NR9URAjwsAJ0cklq9ksqA8A/g+cA1+c7ay+n22wCfbwxq V5egII1MAYNLbIuUs9eFKDY= =XTHH -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Sun 11 May 2008 01:04:01 NZST +1200, Carlos E. R. wrote:
Both are multiboot systems with the hardware clock set to local (GMT-0400) time. Why are they different?
I've observed cmos clock drifts of 3s/day on recent motherboards, and wouldn't put much mnore faith into CPU clock frequency accuracies either (which is what the kernel time runs on while the computer is running).
The adjtime file serves to keep track of the different speed of the hardware clock (the cmos, battery, clock) when compared with an external source, with the purpose of adjusting for the estimated clock drift when booting the system. It is absolutely normal than different machines have different drifts.
cer@nimrodel:~> cat /otros/test_d/etc/adjtime
And each of them assumes it's the only one writing to cmos and therefore being able to measure its clock drift. Even with a single-boot system I didn't get high confidence in the past of this process working realibly. Just through adjtime away completely and fetch the time (ntpdate) when booting. Run ntp on anything turned on more than a day if you care about the time, run ntp *always* on networked computers that may run several days at once. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2008-05-11 at 10:17 +1200, Volker Kuhlmann wrote:
On Sun 11 May 2008 01:04:01 NZST +1200, Carlos E. R. wrote:
Both are multiboot systems with the hardware clock set to local (GMT-0400) time. Why are they different?
I've observed cmos clock drifts of 3s/day on recent motherboards,
Those are the ones adjusted by adjtime. The thing is that the drift, as for any standalone digital quarttz controlled clock, is fairly stable, and thus, adjustable. It is not a problem if they have 5 second drift. It is if it varies.
and wouldn't put much mnore faith into CPU clock frequency accuracies either (which is what the kernel time runs on while the computer is running).
Right.
different drifts.
cer@nimrodel:~> cat /otros/test_d/etc/adjtime
And each of them assumes it's the only one writing to cmos and therefore being able to measure its clock drift.
right. And all are wrong because there have been other adjustements.
Even with a single-boot system I didn't get high confidence in the past of this process working realibly.
It does, fairly well. It is the cpu clock which is very unreliable nowdays.
Just through adjtime away completely and fetch the time (ntpdate) when booting. Run ntp on anything turned on more than a day if you care about the time, run ntp *always* on networked computers that may run several days at once.
Adjtime is quite ok, and ntp is better if you can use it. If you don't have network, it worked fine. Nowdays, i have my doubts. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFIJkqAtTMYHG2NR9URAkYfAJ0Zi8MIVX2ZgU58Sgl1Oeq4DF3PUQCePPHB WHp6D2InOiRWkWD/qlLnqQM= =1VOB -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Volker Kuhlmann wrote:
And each of them assumes it's the only one writing to cmos and therefore being able to measure its clock drift. Even with a single-boot system I didn't get high confidence in the past of this process working realibly. Just through adjtime away completely and fetch the time (ntpdate) when booting. Run ntp on anything turned on more than a day if you care about the time, run ntp *always* on networked computers that may run several days at once.
I came to the same conclusion. I'd prefer to disable that /etc/adjtime magic by default. It just leads to unexplainable clock changes for those who don't know about the mechanism. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (5)
-
Carlos E. R.
-
Felix Miata
-
Ken Schneider
-
Ludwig Nussel
-
Volker Kuhlmann