From: Paul de Vrieze <pauldv@gentoo.org>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] Recent clock problems
Date: Mon, 13 Feb 2006 10:04:08 +0100 [thread overview]
Message-ID: <200602131004.08756.pauldv@gentoo.org> (raw)
In-Reply-To: <200602112039.12848.volker.armin.hemmann@tu-clausthal.de>
[-- Attachment #1: Type: text/plain, Size: 3185 bytes --]
On Saturday 11 February 2006 20:39, Hemmann, Volker Armin wrote:
> On Saturday 11 February 2006 18:41, Mark Knecht wrote:
> > Hello,
> > Just in the last week or so my AMD64 machine has started to
> > exhibit problems with the clock. Maybe it's a hardware problem, or
> > possibly it's some new ntpd issue after updates. At boot time it
> > seems to be coming up with semi-random times. This is causing me to
> > ask a few questions and try to learn a bit more about how this
> > actually works under Linux. Thanks in advance.
> >
> > QUESTION 1: UTC vs. local
> >
> > In /etc/conf.d/clock I can choose UTC vs. local. Does this refer to
> > the time I set in the hardware clock or something else? Nominally
> > it's easier sitting here in California to set the hardware clock to
> > California time. Is there any problem with doing this? If I
> > understand the comments I should be using 'local' but the default
> > seemed to be UTC.
>
> it does not really matter which one you choose.
Local clock has issues with daylight saving time, so if possible (i.a. no
windows on the machine, or you don't care about it's clock) use UTC time
in the hardware clock. UTC time does not change about.
>
> > QUESTION 2: date
> >
> > date only sets a software clock, correct? Is this all the system uses
> > after boot?
>
After boot, the system clock is gone. The system clock is maintained by
the operating system while the system runs. When shutting down the
current system time is written to the hardware clock, this time is then
retrieved when booting. In this retrieval the contents of /etc/adjtime
are taken into account to correct for systematic drift of the hardware
clock.
Hardware clocks, especially the cheap kind that's in a computer, are not
known for their acuracy. This lack of acuracy is rather constant for a
particular clock though. It is called systematic drift. As it is
predictable it can be corrected. This does however assume that the system
clock is more correct than the hardware clock.
When you have clock issues, the systematic drift is often completely
mistaken. It is then often safe to remove /etc/adjtime and let hwclock
forget it's history (it's incorrect anyway). It will be recreated
automatically. (Do remember though that if you run it manually, you must
specify -utc to indicate the usage of utc for the system clock).
> > QUESTION 3: hwclock -w
> >
> > This is supposed to write the time in the system's software clock
> > into hardware, correct?
>
> yes
or "hwclock -systohc"
>
> > QUESTION 4:
> >
> > Does ntpd actually update the system clock, or is it another layer
> > yet on top. If I use ntpd and then do hwclock -w does an accurate
> > time get written to the hardware clock?
ntpd only sets the system clock, not the hardware clock. If the clock is
acurate (ntpd is running properly and the clock servers are acurate
themselves), "hwclock -systohc" will set the hardware clock properly.
Given that you have configured things properly that is.
Paul
--
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2006-02-13 9:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-11 17:41 [gentoo-amd64] Recent clock problems Mark Knecht
2006-02-11 18:15 ` Bob Slawson
2006-02-11 18:51 ` Mark Knecht
2006-02-11 20:07 ` Bob Slawson
2006-02-11 20:18 ` John Myers
2006-02-11 19:26 ` Nicolas MASSÉ
2006-02-11 19:39 ` Hemmann, Volker Armin
2006-02-13 9:04 ` Paul de Vrieze [this message]
2006-02-13 13:34 ` Hemmann, Volker Armin
2006-02-13 14:50 ` [gentoo-amd64] " Duncan
2006-02-13 17:32 ` [gentoo-amd64] [OT] Swatch's internet time Simon Stelling
2006-02-14 11:57 ` [gentoo-amd64] " Duncan
2006-02-11 20:07 ` [gentoo-amd64] Re: Recent clock problems Duncan
2006-02-11 22:14 ` [gentoo-amd64] [SOLVED] " Mark Knecht
2006-02-11 22:33 ` Barry.SCHWARTZ
2006-02-11 22:56 ` Hemmann, Volker Armin
2006-02-12 9:54 ` [gentoo-amd64] " Duncan
2006-02-15 17:05 ` [gentoo-amd64] " Tres Melton
2006-02-15 17:52 ` [gentoo-amd64] " Duncan
2006-02-11 22:30 ` [gentoo-amd64] " Barry.SCHWARTZ
-- strict thread matches above, loose matches on Subject: below --
2006-02-13 17:12 Dmitri Pogosyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200602131004.08756.pauldv@gentoo.org \
--to=pauldv@gentoo.org \
--cc=gentoo-amd64@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox