Moving Beyond SSH: Time Synchronization

Published on May 1, 2009   //  Development

Moving Beyond SSH

Just like on your computer at home, you server keeps the current time. This is usually done on both a hardware clock and a software clock (in the OS). The difference between the two is that the hardware clock is always counting (whether the server is turned on or not) and the software is only counting when the server is turned on. The software clock will retrieve the time from the hardware clock on bootup, then start its own counting of the clock.

Much like most clocks, the hardware time will start to become slightly inaccurate over time. This also causes there to be a small difference in the hardware and the software clock. Luckily, there’s a very simple solution to this problem. You can set your server to automatically retrieve the current time from a time server every so often. Your computer at home is likely set to do this by default.

While your computer’s time server is probably set to one owned by the company who makes your Operating System, we’re going to use an NTP pool to keep our server’s time up-to-date. An NTP pool is a group of servers in a specific region which keep the correct time.

To set our server to synchronize its time with an NTP pool, first login to Webmin. Then, navigation to Hardware > System time. Click on the Time server sync tab. In the Timeserver hosname field enter in north-america.pool.ntp.org. We’re going to be using the North American NTP pool, since our server is located in North America. Check the Set hardware time too box and (if you like) choose to update the time periodically. Press the Sync and Apply button.

There you have it, you server will now have an up-to-date hardware and software clock.

2 Comments to “Moving Beyond SSH: Time Synchronization”

  • Very nicely you have describe the difference hardware clock and a software clock.

  • This post show the real difference between clocks.