Sunday, July 01, 2012

Time, Time, Time: Handling Leap Seconds with Grace and Style

OK, so the dreaded leap second 23:59:60 (no kidding) has come and gone.  A few folks noticed discrepancies in their various computer systems' time and date, and there were some reports of "pegged CPU" as individual systems crossed the leap-second boundary.

Well, those of you running your own NTP server for local time services (what, you mean you AREN'T running a local NTP service for your enterprise?  SHAME ON YOU...but that's another article) can anticipate leap seconds and handle them gracefully in the future.  The US National Institute of Standards and Technology publishes a list (the list, actually) of leap seconds--both past and anticipated future--that your NTP servers will happily use to make a graceful navigation through the perils of 23:59:60.

Check out the link below for details...oh, and you'll need the leap-seconds file itself.  Hint: it's much easier to configure leap second support if you're running ntpd v4.2.6 or later, WHICH YOU SHOULD BE RUNNING ANYWAY.

ConfiguringNTP < Support < NTP

A word of advice to those running Ubuntu Linux - the default configuration for ntpd points you to servers in the DNS collection.  The servers in that pool appear to be a mix of North American and European time servers, several of which I found to be "too far away" (in network terms) from my site.  If you're in the US, you'll probably get more accurate time data if you point your NTP daemon to servers in the DNS collection; I used [0123] (no, ntp.conf doesn't read regexps).  Users in other countries can check DNS for [country-code] (,, etc.) to look for a "closer" pool of public time servers.

Don't let the next leap second turn your data center into a Salvador Dali painting...

Post a Comment