Time Lapses – RTC Drift In My Servers

I always assumed that my Ubuntu based servers would automatically keep their real time clocks synchronized to NTP servers on the net. But when I recently checked the time on my local Owncloud server at home, I was quite surprised that it was off by over a minute. Also, the time on a virtual server I use for my backup SSH tunnels on the Amazon cloud was off by over 30 seconds. It turns out that Ubuntu server only polls an NTP server at system startup and both machines have been up and running without a restart for over a month. Quite an RTC drift for only 30 days, I would have expected far less. The issue can be fixed quite easily with the following entry in /etc/crontab but I wonder why Ubuntu doesn't do it out of the box!?:

# Synchronize date with ntp server once a day and write the result to syslog
00 6    * * *   root    ntpdate ntp.ubuntu.com | logger

2 thoughts on “Time Lapses – RTC Drift In My Servers”

  1. Hi

    Using ntpdate will always make the clock jump when it is synchronized, causing small time lapses.

    In order to have almost continuous synchronization with drift adjustment you should use ntpd. The configuration is trivial.


  2. You are right about ntpd. But I also prefer the scheduled ntpdate because ntpd is extremely chatty – several messages every few seconds while it tries to keep the time very precise.

Comments are closed.