The ntpd program is an operating system daemon that sets and maintains the system time in synchronization with Internet standard time servers. It is a complete implementation of the Network Time Protocol (NTP) version 4, but retains compatibility with versions 1, 2, and 3 as defined by RFC 1059, RFC 1119, and RFC 1305, respectively. ntpd performs most computations in 64-bit floating point arithmetic and uses 64-bit fixed point operations only when necessary to preserve the ultimate precision, about 232 picoseconds. While the ultimate precision is not achievable with ordinary workstations and networks of today, it may be required with future processors and networks.
xntpd is the Network Time Protocol version three daemon software. The "x" was added to the name because the branch of code that eventually became NTPv3 was "experimental". The name of the software was changed back to "ntpd" for version four because the NTP creator, Dave Mills, decided that something probably should not be "experimental" for about twenty years without changing dramatically.
ntpd uses a single configuration file to run the daemon in server and/or client modes. The configuration file is usually named ntp.conf and is located under the /etc directory. Other important files include the drift file, which is used by ntpd to correct for hardware clock skew in the absence of a connection to a more accurate upstream time server.
||This article contains instructions, advice, or how-to content. (March 2013)|
If ntpd does not work (but is correctly configured) assuming an RFC-compliant implementation, your clock may have drifted too far. If you view /var/log/ntp.log, you may see an entry similar to:
18 Aug 21:04:40 ntpd: time correction of 1738 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time.
To manually force the time to synchronize, use:
or on systems having only the ntp client installed
Note that switching time settings by large amounts may cause undefined behavior in long-running or complex processes, and is not advised for servers.
The ntpq command can be used to connect to an ntpd daemon and query it for various parameters. To show what peers are available and synchronization status try:
ntpq -p localhost
Complete NTP implementations
- The NTP Reference Implementation from The NTP Project at the University of Delaware. Includes a Simple NTP (SNTP) client.
- Windows Port of NTPD – Free Windows port of The NTP Reference Implementation from http://www.ntp.org with an easy-to-use installer
Simple NTP (SNTP) implementations
- OpenNTP – A portable Simple NTPD implementation by the OpenBSD group
- clockspeed – A simplest available and secure suite of NTP/SNTP client, clock skew eliminator, and precise time synchronization server and client
- dntpd – A simple client ntpd in DragonFly BSD
- Chrony – Chronyd implements the NTP protocol and can act as either a client or a server.
- BusyBox, since version 1.16.2, has included an SNTP client and server based on OpenNTP.
Information and support
- Official NTP Documentation for the current development release
- The NTP Forum
- NTP Community Support Information
- NTP Development Collaboration
- NTP Mailing Lists
- NTP Software and Documentation Archive
- NTP Documentation Archive for current development and all stable releases of the NTP codebase
- OpenNTP manual pages
- How To: CentOS / Red Hat Linux Configure an NTP Client And Server
- Generic Linux notes
- Setting up NTP on Windows
- ntpd - Network Time Protocol (NTP) daemon Mills, D. L. The University of Delaware, USA. 2005. (Date Accessed: 19 August 2005)