Quantcast
Channel: Linux Help » services
Viewing all articles
Browse latest Browse all 2

Linux – Keep Time with NTP

$
0
0

Linux – Getting the Correct Time
By Richard N Williams

Ensuring a computer is not only displaying the correct time but that it is being maintained accurately is not as straight-forward as it first sounds.

Most Linux systems have two clocks. The hardware clock, also known as the CMOS of Bios clock, is usually a simple crystal oscillator with battery back-up that maintains time when your system is off or boots up. This clock is usually located on the motherboard and will run all the time, however these clock chips tend to lose time as the computer ages and the battery weakens.9

The other clock, the system clock, is a software clock and it starts when you boot up your system often getting an initial time from the hardware clock. System clocks keep time by adding seconds on to a prime epoch, a base time that for Linux and Unix, began at midnight on January 1, 1970.

However, the hardware clock is a cheap electronic oscillator and cannot maintain time to any useful degree of accuracy. They often drift several seconds a day which for day-to-day process is probably adequate but with time sensitive applications it can cause serious problems.

A better way is to set the system clock using the time from a NTP (Network Time Protocol) time server. These dedicated time servers get a UTC (Coordinated Universal Time) time from an atomic clock which are the most accurate time keepers in the world, not losing a second in time in several millions of years.

Dedicated NTP servers use either a radio receiver to pick-up a radio time and frequency broadcast which are transmitted by several national laboratories or by using the timing signal broadcast from the GPS network.

Linux uses a NTP service called NTP Daemon (ntpd). This uses NTP to adjust the system clock for any drift in time as it frequently check the UTC time source.

To configure the NTP daemon the ntp.conf file in the /etc directory can be used. From here more than one time server can be used as a reference and also the frequency it is checked can also be altered.

Richard N Williams is a technical author and specialist in atomic clocks, telecommunications, NTP and network time synchronisation helping to develop dedicated NTP clocks. Please visit us for more information about a network time server or other ntp server solutions.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images