Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
28
rated 0 times [  28] [ 0]  / answers: 1 / hits: 55348  / 1 Year ago, wed, february 22, 2023, 10:02:38

When the ntpd daemon is running, the file: /var/lib/ntp/ntp.drift gets updated periodically. Example:



17:20 hostname 118 ~> ls -l /var/lib/ntp/ntp.drift
-rw-r--r-- 1 ntp ntp 7 May 20 16:46 /var/lib/ntp/ntp.drift
# So it looks like it was last updated ~34 minutes ago


The file has one number in it, for example, looking at a 4 virtual hosts, I find these values, respectively:



-22.086
-10.214
-13.669
6.045


I assume these are seconds per day(?), but not sure. man ntpd mentions a different drift file /etc/ntp.drift which doesn't seem to exist. The man page doesn't explain what units are being used for the drift.



Questions:




  • Is /etc/ntp.drift actually /var/lib/ntp/ntp.drift on Ubuntu?

  • What units is the drift expressed in?



Thanks!


More From » time

 Answers
0

The drift file is /var/lib/ntp/ntp.drift. This is fairly standard. For RH/Fedora, it's /var/lib/ntp/drift.



The units for the drift file are "PPM", or "parts per million". Your clock will drift due to fluctuations in the frequency oscillating the quartz crystal on your motherboard. A fluctuation of just 0.001% (0.00001, or 10 PPM) means losing or gaining about 1 second per day. NTP has finer grained control than that, so we look at errors of margin using 0.0001% (0.000001, or 1 PPM). Thus:




  • 1 PPM = 1 part per million = 1 microsecond per second = 3.6ms per hour = 86.4ms per day



Thus, my drift file shows the value of "2.643" which means my clock is off by 2.643 parts per million, which means it's currently off at 228.3552ms per day.


[#31118] Friday, February 24, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
uffno

Total Points: 283
Total Questions: 93
Total Answers: 111

Location: Saint Vincent and the Grenadines
Member since Thu, Oct 15, 2020
4 Years ago
uffno questions
Thu, Sep 2, 21, 18:08, 3 Years ago
Sun, Apr 2, 23, 15:15, 1 Year ago
Sat, Jan 8, 22, 16:37, 2 Years ago
;