Delivery-focussed Elixir, Python, XSL/XQuery, (No)SQL, and Agile consultancy, specialising in content migration, API design, and (micro)services.

LinkedIn Octocat RSS

Quick tip — Staying up-to-date on linux

We noticed that our servers’ clocks were slightly off. Adding the following to our /etc/rc.local file keeps our servers updated whenever it boots:

set -- `nc 13`
date -u --set="$2 $3"

I’ve also added it to our cron.daily so there’s no slip while the servers are running.

On this particular server we were resource-limited, so installing ntpd wasn’t an option. However, if you have the resources then this would be the preferred approach.

Originally posted: Mar 08 2013