Tech Tip: Synchronize your Linux system's time with clockspeed
Takeaway: Not only can clockspeed update a system's clock from an NTP server, but it can also calculate clock drifts and manage the system time accordingly.
Most people who want to maintain an accurate computer clock use Network Time Protocol (NTP) to set their clocks to the same time as an atomic clock. NTP is a great way to ensure all of the computers on a network operate with an identical time, which helps with watching log files, scheduled automatic maintenance jobs, etc.
However, if you have a large network, NTP can create a fair amount of traffic to keep the clocks updated. It needs to run somewhat regularly to adjust for individual clock drifts on different computers. So unless you set up your own NTP server for the network, it can generate more traffic than you bargained for.
One alternative is D. J. Bernstein's clockspeed program. Not only can it update the system's clock from an NTP server, but it can also calculate clock drifts and manage the system time accordingly.
Using clockspeed, you should only need to synchronize with an NTP server infrequently after the initial configuration; it could be even as rarely as once a year.
To begin, download clockspeed from the Web, and compile and install it. Then, use the sntpclock tool to view the difference between the remote clock and the local clock, as shown below. (Replace 1.2.3.4 with the remote NTP server's IP address.)
# sntpclock 1.2.3.4 | clockview
This shows the current time as well as the time the NTP server displays. To update the local clock to the same time as the NTP server, execute the following:
# sntpclock 1.2.3.4 | clockadd
Next, run clockspeed as a daemon by adding the following to something like /etc/rc.d/rc.local.
clockspeed &
The Install file that comes with clockspeed provides further information for checking and adjusting your system clock after a few days and after a few weeks. This should synchronize your local clock with the remote clock within a few seconds per century. At that point, verifying the time once a year should be perfectly reasonable.
SponsoredWhite Papers, Webcasts, and Downloads
- Effectively Securing Small Businesses from Online Threats: Minimizing the Risks Associated with Email, Web, and Instant Message Communications MessageLabs
- 7 Virtualization Challenges: Building a Virtualization-Ready Networking Infrastructure F5 Networks
- F5 Demo: F5 and VMware Virtualization Technology F5 Networks
- The Botnet Threat: Targeting Your Business MessageLabs
- Not Just Words: Enforce Your Email and Web Acceptable Usage Policies MessageLabs
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET
