time/ntp[d]

Björn Persson bjorn at xn--rombobjrn-67a.se
Thu Aug 7 16:55:34 UTC 2008


Todd Denniston wrote:
> > One other bit of info, if I turn off ntpd over night, the clock loses
> > time (new battery required?)

The various oscillators in a typical computer aren't high-precision clocks. 
Without NTP you'll have to adjust the time frequently.

If you turn the computer off, and when you turn it on again it thinks it's the 
first of January 1990 or something, then you probably need to replace the 
battery.

> no, unlike MS, Unix system clock uses the frequency ticker on the CPU to
> keep time, which is independent of the battery backed TOY clock.
> i.e., after shutting ntpd off run:
> date;/sbin/hwclock --show;date
> then after you have slept
> date;/sbin/hwclock --show;date
>
> I expect the time from the date commands to have drifted as you are seeing,
> but the time from hwclock will have drifted differently.
> date -> returns system time
> hwclock -> returns TOY clock time.

When NTPD is running, however, it will inform Linux that the system time is 
synchronized to a time source, and Linux will then keep the hardware clock in 
synch with the system time. You may need to run "hwclock --systohc" once if 
it's off by half an hour or more, but after that it should stay correct as 
long as NTPD is running. That way, if the system crashes the time should 
still be reasonably right when it comes back up.

Björn Persson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080807/db3ca9ac/attachment-0001.sig>


More information about the fedora-list mailing list