Advanced NTP client and server
Find a file
Miroslav Lichvar f93f2a15af ntp: check also reference timestamp in test3
Zero reference timestamp doesn't pass test7, but only before we reach
the next NTP era.
2015-03-27 10:37:54 +01:00
contrib contrib: remove DNSchrony from distribution 2015-01-26 10:39:58 +01:00
examples examples: add chrony.conf.example1 2015-01-27 15:03:57 +01:00
test ntp: change default maxdelay to 3 seconds 2015-03-27 10:37:54 +01:00
.gitignore git: update .gitignore 2014-04-08 17:00:47 +02:00
addressing.h ntp: store socket in NTP instance 2014-03-25 15:22:59 +01:00
addrfilt.c ntp: open server socket only when access is allowed 2015-01-06 16:35:12 +01:00
addrfilt.h ntp: open server socket only when access is allowed 2015-01-06 16:35:12 +01:00
array.c Add array utility functions 2014-09-25 10:58:57 +02:00
array.h Add array utility functions 2014-09-25 10:58:57 +02:00
candm.h cmdmon: remove obsolete request/reply in candm.h 2015-03-27 10:37:54 +01:00
chrony.1 doc: update for NTPv4 support 2014-10-14 16:57:01 +02:00
chrony.conf.5.in doc: update chrony.conf man page 2015-01-27 15:03:57 +01:00
chrony.texi.in ntp: change default maxdelay to 3 seconds 2015-03-27 10:37:54 +01:00
chronyc.1.in client: set default hostname to 127.0.0.1 instead of localhost 2014-05-16 18:51:06 +02:00
chronyd.8.in doc: clarify description of -s option 2014-08-20 16:54:26 +02:00
client.c cmdparse: add function to convert error status to string 2014-12-15 18:21:51 +01:00
clientlog.c clientlog: remove unused code 2015-01-26 11:38:02 +01:00
clientlog.h clientlog: remove unused code 2015-01-26 11:38:02 +01:00
cmdmon.c cmdmon: fix noselect flag setting in source data 2015-03-27 10:37:54 +01:00
cmdmon.h Create sockets only in selected family with -4 or -6 option 2013-05-20 15:37:25 +02:00
cmdparse.c cmdparse: add function to convert error status to string 2014-12-15 18:21:51 +01:00
cmdparse.h cmdparse: add function to convert error status to string 2014-12-15 18:21:51 +01:00
conf.c reference: add new leap second handling modes 2015-03-27 10:37:48 +01:00
conf.h reference: add new leap second handling modes 2015-03-27 10:37:48 +01:00
configure ntp: merge broadcast code with ntp_core 2014-10-15 12:27:46 +02:00
COPYING Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
getdate.c Fix compiler warnings on NetBSD 2014-09-09 11:48:09 +02:00
getdate.h Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
getdate.y Fix compiler warnings on NetBSD 2014-09-09 11:48:09 +02:00
hash.h Free allocated memory on exit 2014-09-25 10:57:55 +02:00
hash_intmd5.c Free allocated memory on exit 2014-09-25 10:57:55 +02:00
hash_nss.c Free allocated memory on exit 2014-09-25 10:57:55 +02:00
hash_tomcrypt.c Free allocated memory on exit 2014-09-25 10:57:55 +02:00
keys.c ntp: update packet processing to NTPv4 (RFC 5905) 2014-10-14 16:52:22 +02:00
keys.h keys: store IDs in uint32_t 2014-09-26 14:14:54 +02:00
local.c reference: use step leap mode by default if system is not supported 2015-03-27 10:37:54 +01:00
local.h reference: use step leap mode by default if system is not supported 2015-03-27 10:37:54 +01:00
localp.h local: add new driver call to set synchronization status 2014-12-10 15:35:56 +01:00
logging.c logging: remove warning on missing debug messages 2014-09-25 11:12:23 +02:00
logging.h Check for memory allocation errors 2014-09-23 15:47:02 +02:00
main.c create NTP and cmdmon sockets after root drop 2015-01-22 15:38:39 +01:00
main.h Remove CVS headers 2011-01-28 12:56:09 +01:00
make_release Move chrony.spec to examples 2014-09-04 17:25:56 +02:00
Makefile.in Add array utility functions 2014-09-25 10:58:57 +02:00
manual.c local: reset daemon after unexpected time jump 2014-06-02 17:38:32 +02:00
manual.h Remove CVS headers 2011-01-28 12:56:09 +01:00
md5.c Add support for different authentication hashes 2011-11-02 13:53:00 +01:00
md5.h Cleanup including of system headers 2013-06-14 13:41:16 +02:00
memory.c Check for memory allocation errors 2014-09-23 15:47:02 +02:00
memory.h Check for memory allocation errors 2014-09-23 15:47:02 +02:00
mkdirpp.c Check for memory allocation errors 2014-09-23 15:47:02 +02:00
mkdirpp.h Remove CVS headers 2011-01-28 12:56:09 +01:00
nameserv.c nameserv: add support for returning multiple addresses 2014-10-23 16:48:13 +02:00
nameserv.h nameserv: add support for returning multiple addresses 2014-10-23 16:48:13 +02:00
nameserv_async.c nameserv: add support for returning multiple addresses 2014-10-23 16:48:13 +02:00
nameserv_async.h nameserv: add support for returning multiple addresses 2014-10-23 16:48:13 +02:00
NEWS doc: update NEWS 2015-01-27 15:03:57 +01:00
ntp.h ntp: keep all length constants signed 2015-01-22 14:37:35 +01:00
ntp_core.c ntp: check also reference timestamp in test3 2015-03-27 10:37:54 +01:00
ntp_core.h ntp: return status from NCR_ProcessKnown() 2014-11-24 16:14:04 +01:00
ntp_io.c ntp: remove unnecessary check in read_from_socket() 2015-01-22 15:38:41 +01:00
ntp_io.h ntp: count references to NTP server sockets 2015-01-06 16:33:49 +01:00
ntp_sources.c ntp: limit number of pool sources 2014-11-26 17:56:36 +01:00
ntp_sources.h ntp: support pools 2014-11-03 11:18:04 +01:00
pktlength.c client: add second form of makestep command 2014-12-09 12:31:56 +01:00
pktlength.h Add padding to cmdmon requests to prevent amplification attack 2014-01-30 15:59:45 +01:00
README doc: update for NTPv4 support 2014-10-14 16:57:01 +02:00
refclock.c refclock: start refid numbering at zero 2015-02-17 10:33:03 +01:00
refclock.h sources: allow setting minsamples and maxsamples for each source 2014-12-03 16:27:51 +01:00
refclock_phc.c Convert TRACEON LOG messages to DEBUG_LOG 2013-11-27 14:35:41 +01:00
refclock_pps.c configure: unify macro naming for optional features 2014-09-22 13:14:16 +02:00
refclock_shm.c Convert TRACEON LOG messages to DEBUG_LOG 2013-11-27 14:35:41 +01:00
refclock_sock.c refclock: fix compiler warning in SOCK error message 2014-08-05 17:13:08 +02:00
reference.c reference: use step leap mode by default if system is not supported 2015-03-27 10:37:54 +01:00
reference.h reference: add new leap second handling modes 2015-03-27 10:37:48 +01:00
regress.c Convert disabled log messages to debug or remove them 2014-06-27 10:17:35 +02:00
regress.h regress: make minimum number of samples for regression public 2014-04-10 17:15:13 +02:00
reports.h clientlog: remove unused code 2015-01-26 11:38:02 +01:00
rtc.c rtc: set clock to mtime of driftfile when RTC preinit fails 2014-08-19 10:46:35 +02:00
rtc.h rtc: move preinit call to RTC_Initialise() 2014-08-19 10:46:32 +02:00
rtc_linux.c rtc: allocate samples dynamically 2014-09-25 10:58:57 +02:00
rtc_linux.h rtc: return status from preinit function 2014-08-19 10:46:35 +02:00
sched.c sched: allocate file handlers dynamically 2014-09-25 10:58:57 +02:00
sched.h Rename SCH_GetFileReadyTime() and extend it to return raw time 2013-06-05 18:07:05 +02:00
sources.c sources: allow setting minsamples and maxsamples for each source 2014-12-03 16:27:51 +01:00
sources.h sources: allow setting minsamples and maxsamples for each source 2014-12-03 16:27:51 +01:00
sourcestats.c sources: allow setting minsamples and maxsamples for each source 2014-12-03 16:27:51 +01:00
sourcestats.h sources: allow setting minsamples and maxsamples for each source 2014-12-03 16:27:51 +01:00
srcparams.h ntp: change default maxdelay to 3 seconds 2015-03-27 10:37:54 +01:00
strerror.c Use config.h 2011-05-24 18:07:06 +02:00
stubs.c ntp: support pools 2014-11-03 11:18:04 +01:00
sys.c configure: unify macro naming for optional features 2014-09-22 13:14:16 +02:00
sys.h Remove CVS headers 2011-01-28 12:56:09 +01:00
sys_generic.c sys: add sync status setting to generic and Linux driver 2014-12-10 15:58:13 +01:00
sys_generic.h local: add new driver call to set synchronization status 2014-12-10 15:35:56 +01:00
sys_linux.c sys: avoid syslog message when leap bits are not changed 2015-03-25 15:32:05 +01:00
sys_linux.h Remove kernel version check from rtc code 2011-06-06 21:33:59 +02:00
sys_netbsd.c local: add new driver call to set synchronization status 2014-12-10 15:35:56 +01:00
sys_netbsd.h Remove CVS headers 2011-01-28 12:56:09 +01:00
sys_solaris.c local: add new driver call to set synchronization status 2014-12-10 15:35:56 +01:00
sys_solaris.h Remove CVS headers 2011-01-28 12:56:09 +01:00
sys_sunos.c local: add new driver call to set synchronization status 2014-12-10 15:35:56 +01:00
sys_sunos.h Remove CVS headers 2011-01-28 12:56:09 +01:00
sysincl.h configure: unify macro naming for optional features 2014-09-22 13:14:16 +02:00
tempcomp.c tempcomp: allow configuration with list of points 2014-11-21 13:11:16 +01:00
tempcomp.h Update copyright 2011-01-27 13:05:26 +01:00
util.c Update comments referencing RFC 1305 2014-10-14 16:52:22 +02:00
util.h util: fix sockaddr function naming 2014-10-03 10:15:18 +02:00
wrap_adjtimex.c sys: avoid syslog message when leap bits are not changed 2015-03-25 15:32:05 +01:00
wrap_adjtimex.h sys: avoid syslog message when leap bits are not changed 2015-03-25 15:32:05 +01:00

This is the README for chrony.

What is chrony?
===============

Chrony is a pair of programs for maintaining the accuracy of computer
clocks.

chronyd is a (background) daemon program that can be started at boot
time.  This does most of the work.

chronyc is a command-line interface program which can be used to
monitor chronyd's performance and to change various operating
parameters whilst it is running.

chronyd's main function is to obtain measurements of the true (UTC)
time from one of several sources, and correct the system clock
accordingly.  It also works out the rate at which the system clock
gains or loses time and uses this information to keep it accurate
between measurements from the reference.

The reference time can be derived from Network Time Protocol (NTP)
servers, reference clocks, or wristwatch-and-keyboard (via chronyc).
The main source of information about the Network Time Protocol is
http://www.ntp.org.

It is designed so that it can work on computers which only have
intermittent access to reference sources, for example computers which
use a dial-up account to access the Internet or laptops.  Of course, it
will work well on computers with permanent connections too.

In addition, on Linux it can monitor the system's real time clock
performance, so the system can maintain accurate time even across
reboots.

Typical accuracies available between 2 machines are

On an ethernet LAN : 100-200 microseconds, often much better
On a V32bis dial-up modem connection : 10's of milliseconds (from one
session to the next)

With a good reference clock the accuracy can reach one microsecond.

chronyd can also operate as an NTPv4 (RFC 5905) server, peer and broadcast
server.


What will chrony run on?
========================

Chrony can be successfully built and run on

1. Linux 2.2.x, 2.3.x, 2.4.x, 2.6.x, 3.x

2. Solaris 2.5/2.5.1/2.6/2.7/2.8 (various platforms) 

3. SunOS 4.1.4 (Sparc 2 and Sparc 20)

4. BSD/386 v1.1 has been reported to work using the SunOS 4.1 driver.

5. NetBSD.

Any other system will require a porting exercise.  You would need to
start from one of the existing system-specific drivers and look into
the quirks of certain system calls and the kernel on your target
system.

How do I set it up?
===================

The file INSTALL gives instructions.  On supported systems the
compilation process should be automatic.

You will need an ANSI C compiler -- gcc is recommended.

The manual (in texinfo and text formats) describes how to set the
software up for the less straightforward cases.

What documentation is there?
============================

A manual is supplied in Texinfo format (chrony.texi) and
ready-formatted plain text (chrony.txt) in the distribution.

There is also information available on the chrony web pages, accessible
through the URL 

    http://chrony.tuxfamily.org/

Where are new versions announced?
=================================

There is a low volume mailing list where new versions and other
important news relating to chrony is announced.  You can join this list
by sending mail with the subject "subscribe" to

chrony-announce-request@chrony.tuxfamily.org

These messages will be copied to chrony-users (see below).

How can I get support for chrony?
and where can I discuss new features, possible bugs etc?
========================================================

There are 3 mailing lists relating to chrony.  chrony-announce was
mentioned above.  chrony-users is a users' discussion list, e.g. for
general questions and answers about using chrony.  chrony-dev is a more
technical list, e.g. for discussing how new features should be
implemented, exchange of information between developers etc.  To
subscribe to either of these lists, send a message with the subject
"subscribe" to

chrony-users-request@chrony.tuxfamily.org
or
chrony-dev-request@chrony.tuxfamily.org

as applicable.


Author
======

Richard P. Curnow <rc@rc0.org.uk>


Maintainers
===========

Miroslav Lichvar <mlichvar@redhat.com>


Acknowledgements
================

The following people have provided patches and other major contributions
to the program :

Benny Lyne Amorsen <benny@amorsen.dk>
    Patch to add minstratum option

Andrew Bishop <amb@gedanken.demon.co.uk>
    Fixes for bugs in logging when in daemon mode
    Fixes for compiler warnings
    Robustness improvements for drift file
    Improve installation (directory checking etc)
    Entries in contrib directory
    Improvements to 'sources' and 'sourcestats' output from chronyc
    Improvements to documentation
    Investigation of required dosynctodr behaviour for various Solaris
      versions.

Stephan I. Boettcher <stephan@nevis1.columbia.edu>
    Entries in contrib directory

Erik Bryer <ebryer@spots.ab.ca>
    Entries in contrib directory

Juliusz Chroboczek <jch@pps.jussieu.fr>
    Fix install rule in Makefile if chronyd file is in use.

Paul Elliott <pelliott@io.com>
    DNSchrony (in contrib directory), a tool for handling NTP servers
    with variable IP addresses.

Mike Fleetwood <mike@rockover.demon.co.uk>
    Fixes for compiler warnings

Alexander Gretencord <arutha@gmx.de>
    Changes to installation directory system to make it easier for
    package builders.

Walter Haidinger <walter.haidinger@gmx.at>
    Providing me with login access to a Linux installation where v1.12
    wouldn't compile, so I could develop the fixes for v1.13.  Also, for
    providing the disc space so I can keep an independent backup of the
    sources.

Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
    Port to NetBSD

John Hasler <john@dhh.gt.org>
    Project and website at tuxfamily.org
    Changes to support 64 bit machines (i.e. those where
      sizeof(unsigned long) > 4)
    Bug fix to initstepslew directive
    Fix to remove potential buffer overrun errors.
    Memory locking and real-time scheduler support
    Fix fault where chronyd enters an endless loop

Tjalling Hattink <t.hattink@fugro.nl>
    Fix scheduler to allow stepping clock from timeout handler
    Patch to take leap second in PPS refclock from locked source
    Patch to make reading of RTC for initial trim more reliable

Liam Hatton <me@liamhatton.com>
    Advice on configuring for Linux on PPC

Jachym Holecek <jakym@volny.cz>
    Patch to make Linux real time clock work with devfs

Håkan Johansson <f96hajo@chalmers.se>
    Patch to avoid large values in sources and sourcestats output

Jim Knoble <jmknoble@pobox.com>
    Fixes for compiler warnings

Antti Jrvinen <costello@iki.fi>
    Advice on configuring for BSD/386

Miroslav Lichvar <mlichvar@redhat.com>
    Reference clock support
    IPv6 support
    Linux capabilities support
    Leap second support
    Improved source selection
    Improved sample history trimming
    Improved polling interval adjustment
    Improved stability with temporary asymmetric delays
    Temperature compensation
    Many other bug fixes and improvements

Victor Moroz <vim@prv.adlum.ru>
    Patch to support Linux with HZ!=100

Kalle Olavi Niemitalo  <tosi@stekt.oulu.fi>
    acquisitionport support

Frank Otto <sandwichmacher@web.de>
    Handling arbitrary HZ values

Andreas Piesk <apiesk@virbus.de>
    Patch to make chronyc use the readline library if available

Timo Teras <timo.teras@iki.fi>
    Patch to reply correctly on multihomed hosts

Wolfgang Weisselberg <weissel@netcologne.de>
    Entries in contrib directory

Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
    Many robustness and security improvements
    
Ulrich Windl <ulrich.windl@rz.uni-regensburg.de> for the
    Providing me with information about the Linux 2.2 kernel
    functionality compared to 2.0.

Doug Woodward <dougw@whistler.com>
    Advice on configuring for Solaris 2.8 on x86

Many other people have contributed bug reports and suggestions.  I'm
sorry I can't identify all of you individually.