On 2011-07-16 09:28, Per Jessen wrote:
Carlos E. R. wrote:
Both clocks have different drifts, taken into account differently. #1 by hwclock, #2 by ntp. Don't mix names!
man ntp.conf:
driftfile This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator.
That's right, the drift of the system clock.
When the system boots, clock #1 is read, its drift calculated, and then clock #2 is set up with the result. This is done via scripts and hwclock. When the system runs, #1 is not used at all. Time is read from #2 only, and its drift is corrected by NTP (if available). When the system goes down, the system ensures that clock #1 is adjusted, and its drift calculated and noted.
AFAIR, ntp updates the drift file once an hour.
The drift of the system clock, yes; not the cmos clock (aka hardware clock, or bios clock): cer@Telcontar:~> l /etc/adjtime -rw-r--r-- 1 root root 44 Jul 16 03:39 /etc/adjtime Now is 12:34. I hibernated the machine precisely at: <5.4> 2011-07-16 03:39:46 Telcontar pm-utils - - - Hibernating (95)... <5.4> 2011-07-16 12:03:49 Telcontar pm-utils - - - Thawing (95)... So it appears the hw drift file was updated precisely when I hibernated. I have to wait half an hour (till 13:04) and see if it is updated. .... cer@Telcontar:~> date; l /etc/adjtime Sat Jul 16 13:10:16 CEST 2011 -rw-r--r-- 1 root root 44 Jul 16 03:39 /etc/adjtime Nope, the drift file for the hardware clock is not updated every half hour. I'm going out, I'll leave it running and see. -- Cheers / Saludos, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar)