Re: [SLE] Setting time
From: Marcos Vinicius Lazarini (lazarini_at_nics.unicamp.br)
Date: 09/18/04
- Previous message: Scott Leighton: "Re: [SLE] CUPS Broken After Recent Patch?"
- In reply to: Sjoerd Hiemstra: "Re: [SLE] Setting time"
- Next in thread: Carlos E. R.: "Re: [SLE] Setting time"
- Reply: Carlos E. R.: "Re: [SLE] Setting time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 18 Sep 2004 00:13:58 -0300 To: suse-linux-e@suse.com
Sjoerd Hiemstra wrote:
>
> Adjusting the KDE clock is rather self-explaining, but here's a good
> old-fashioned command line version: ;-)
>
> 'su' to root
> delete /etc/adjtime
> date 09011500 (as an example)
> hwclock --systohc
>
> This creates a new /etc/adjtime file.
> A week or so later do, again as root:
>
> date 09081500 (as an example)
> hwclock --systohc
>
> hwclock now calculates how much your clock is running too fast or too
> slow, and stores this information in /etc/adjtime.
> After this, each time you are running, as root,
>
> hwclock --adjust
>
> the time is adjusted according to this information.
> You could have this command executed automatically on startup, or make
> it a cron job.
> More info: man hwclock.
>
> SH
I was trying to fix a clock systematic drift in an old 486 running debian
stable, and found this interesting text about hwclock:
----------
File: /usr/share/doc/util-linux/README.Debian.hwclock.gz
....
Issues with hwclock --adjust:
hwclock has a facility to try to correct for systematic drift in the
hardware clock, accessed by hwclock --adjust. This facility is *dangerous*
because it has a severe drawback: it assumes that no program other than
hwclock --systohc will ever be used to change the hardware clock.
This assumption is often false, as many common utilities such as ntp,
chrony, as well as your computer's System Setup BIOS program, and
any other OS you have in your machine will change the clock.
Also, if hwclock --adjust is used, one must make sure the drift file
(/etc/adjtime) is deleted every time the system clock is set to a very
different value (even if you're using hwclock itself to do it!), or the
drift computation might become invalid and cause the hardware clock to be
incorrectly set the next time hwclock --adjust is used.
hwclock currently does not perform any sort of sanity checks in the values
it uses to compute the drift file, and will corrupt your clock time by
potentially very large amounts if anything goes wrong.
Don't use the hwclock --adjust facility, refer to alternate (and much safer)
programs such as ntp or chrony if you need precision timekeeping.
----------
So, if you're running a server, on all the time, probably hwclock will work
fine. Otherwise, better choose anoter way to keep your clock in sync.
-- Marcos Lazarini -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
- Previous message: Scott Leighton: "Re: [SLE] CUPS Broken After Recent Patch?"
- In reply to: Sjoerd Hiemstra: "Re: [SLE] Setting time"
- Next in thread: Carlos E. R.: "Re: [SLE] Setting time"
- Reply: Carlos E. R.: "Re: [SLE] Setting time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|