[ale] Timing Issues
Joe Steele
joe at madewell.com
Wed Dec 1 19:43:04 EST 1999
A few facts (at least I think they are facts):
1) When you use linuxconf to change the UTC setting, the change is written to /etc/sysconfig/clock. The same result could be obtained by editing the file directly.
2) The ARC option in the /etc/sysconfig/clock file is relevant to Alpha machines only.
3) The UTC setting in the /etc/sysconfig/clock is used when the machine is booted to set the kernel's system clock (which is always on UTC) from the hardware (CMOS) clock. If you were to study /etc/rc.d/rc.sysinit, you would see that one or the other of the following commands is executed on startup, depending on the setting of UTC in the /etc/sysconfig/clock file:
/sbin/hwclock --hctosys
or
/sbin/hwclock --hctosys --utc
As far as I know, this is the only time the /etc/sysconfig/clock file is used, and it is the only time the hardware clock is used as a time source.
4) The hwclock program does not use the /etc/sysconfig/clock file. Therefore, the program does not have any way of knowing whether your hardware clock is set to local time or to UTC time. The purpose of the --utc option is to inform the program which way you have set the clock.
The command "hwclock --show" will show you the true setting of the hardware clock. If the result matches the local time, then your hardware clock is set to local time.
The command "hwclock --show --utc" will read the hardware clock and will subtract 5 hours from it before displaying the time (assuming your local timezone is EST).
5) There is no automatic coordination of the UTC setting in the /etc/sysconfig/clock file and the actual way your hardware clock is set. It is up to you to make sure they are coordinated. Otherwise, when your system reboots, the system time will be set wrong.
6) When you are running xntpd, the hardware clock is set from the system clock after every 11 minutes. This means that the hardware clock will be set to UTC. You should use the same setting in your /etc/sysconfig/clock file.
7) The biggest annoyance I find with having the hardware clock set to local time is that you will probably forget to change it when the time changes. You will never notice it until one day when you reboot the machine and the time is wrong.
--Joe
-----Original Message-----
From: Denny Chambers [SMTP:dchambers at mtnd.com]
Sent: Wednesday, December 01, 1999 9:27 AM
To: Gregory McLean
Cc: ale at ale.org
Subject: Re: [ale] Timing Issues
Sorry for the lack of info. I am running RedHat 6.0 intel. I saw from
linuxconf that "Store date in CMOS" was set to Universal format (GMT). I
don't think that I turned that on, atleast not on purpose. Any way I
turn it off thinking that was my problem. That was about 2 weeks ago and
I am still having the problem. I check the /etc/sysconfig/clock file and
is set to UTC="no" and ARC=false. The man on hwclock talks about how to
set UTC on but I didn't see how to turn it off. If anyone has a clue
please let me know.
Thanks
Denny
Gregory McLean wrote:
>
> -> I am having a problem keeping my clock set properly. I have been using
> -> xntp for about 7 months with no problem. Now my xntp client will die
> -> after a few hours and my clock will fall back exactly 5 hour, which
> -> happens to be the Eastern Time offset from GMT. I have checked
> -> everything that I know to check. Has anyone else seen this problem or
> -> know a possible fix?
>
> My guess is the hardware clock on your machine is either set to utc time
> and when you installed at first you told linux it wasn't. Or vice versa.
> Anyway, you didn't say which distribution this is so I'm not 100% sure of
> a proper fix for you.
>
> The general fix is to find out how the distribution thinks the clock is
> set and set it in that fashion or correct the distributions idea of how
> the hardware clock is set.
>
> How does one set the clock? You should have a hwclock program, see 'man
> hwclock' for its options.
>
> Gregory McLean | What I do is called 'fishing', if it were any easier
> comstar.net inc. |it would be called 'catching' and there would be more
> programmer/analyst |people doing it.
> 770 485-6016 |
> ----------------This is my opinion, All MINE! I tell you------------------
--
Denny Chambers
Software Engineer
Mitsubishi Telecommunication Networks Division
Phone: 770-717-6807 Fax: 770-717-6799
More information about the Ale
mailing list