Ntp drift file not updating

Rated 3.86/5 based on 722 customer reviews

With fake-hwclock installed your machine will not start up thinking it is 1970 all over again.When your machine boots up it will set its clock to the timestamp fake-hwclock wrote during the last reboot/shutdown.I added the following line to $ date ; sudo service ntp stop ; sudo ntpdate -s gov ; sudo service ntp start ; date Thu Jan 1 UTC 1970 * Stopping NTP server ntpd [ OK ] * Starting NTP server [ OK ] Thu Feb 14 UTC 2013 # apt-get install fake-hwclock fake-hwclock: Save/restore system clock on machines without working RTC hardware Some machines don't have a working realtime clock (RTC) unit, or no driver for the hardware that does exist.fake-hwclock is a simple set of scripts to save the kernel's current clock periodically (including at shutdown) and restore it at boot so that the system clock keeps at least close to realtime.I found it handy to write a little script and run it after my internet interface is up, so that I am sure that the moment the network becomes available, the clock gets updated. if [ "$onoff" -gt 0 ]; then echo "stopping ntpd..." service ntp stop echo "ntpd stopped" else echo "ntpd not running, ready to update the date" fi isinstalled=$(dpkg-query -l | grep -c ntpdate) if [ "$isinstalled" -gt 0 ]; then ntpdate -t 3 -s ntp4.stratum2echo "date and time update executed" else echo "ntpdate package not installed, can't update using ntp" fi echo "restarting ntpd..." service ntp start echo "ntpd running" echo "printing current date and time:" date exit The ntpd algorithms discard sample offsets exceeding 128 ms, unless the interval during which no [absolute value of] sample offset is less than 128 ms exceeds 900s.

However, and to protect against broken hardware, such as when the CMOS battery fails or the clock counter becomes defective, once the clock has been set, an error greater than 1000s will cause adjusts the clock in small steps so that the timescale is effectively continuous and without discontinuities.

The program operates by exchanging messages with one or more configured servers at designated poll intervals.

When started, whether for the first or subsequent times, the program requires several exahanges from the majority of these servers so the signal processing and mitigation algorithms can accumulate and groom the data and set the clock.

In order to protect the network from bursts, the initial poll interval for each server is delayed an interval randomized over 0-16s.

At the default initial poll interval of 64s, several minutes can elapse before the clock is set.

Leave a Reply