Carlos E. R. wrote:
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.
Wait - how did you make "local clock oscillator" = system clock? The local clock oscillator is a bit of hardware essentially producing a PPS signal for advancing the hardware clock. The hardware oscillator has a instability or drift, i.e. it is slightly inaccurate. ntp uses the drift-information to fake a PPS when an external source is not available. ntp calls adjtime() to adjust the system clock (software) in tiny steps.
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.
That is not the drift file I'm talking about - I'm talking about NTPs drift file, usually /var/lib/ntp/drift/ntp.drift. -- Per Jessen, Zürich (20.4°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org