Advanced NTP client and server
Find a file
Miroslav Lichvar 86acea5c46 ntp: add interface index to NTP_Local_Address
This will allow us to get the interface index when sending responses to
clients.
2017-01-23 15:58:55 +01:00
contrib rename 'Mac OS X' to 'macOS' 2016-08-11 10:45:48 +02:00
doc refclock_phc: add nocrossts option 2017-01-23 15:58:55 +01:00
examples examples: improve chronyd.service 2017-01-23 15:58:55 +01:00
test ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
.gitignore git: update .gitignore 2016-03-11 17:29:10 +01:00
addressing.h ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
addrfilt.c addrfilt: remove TEST code 2016-02-05 15:20:40 +01:00
addrfilt.h ntp: open server socket only when access is allowed 2015-01-06 16:35:12 +01:00
array.c array: always return non-NULL pointer from ARR_GetElements() 2015-12-02 12:04:09 +01:00
array.h Add array utility functions 2014-09-25 10:58:57 +02:00
candm.h cmdmon: update protocol changelog 2016-12-13 12:57:25 +01:00
client.c update copyright years 2017-01-12 16:34:28 +01:00
clientlog.c clientlog: disable NTP response rate limiting by default 2017-01-06 13:12:18 +01:00
clientlog.h ntp: add support for interleaved client/server mode 2016-11-10 15:26:56 +01:00
cmdmon.c cmdmon: add reserved fields to ntpdata reply 2016-12-13 12:57:25 +01:00
cmdmon.h main: open cmdmon and NTP internet sockets before dropping root 2015-08-25 17:09:18 +02:00
cmdparse.c ntp: avoid truncation of NTPv4 MACs by default 2016-12-02 14:53:03 +01:00
cmdparse.h cmdparse: remove CPS_Status 2016-06-27 14:52:55 +02:00
conf.c conf: add nocrossts option to hwtimestamp directive 2017-01-23 15:58:55 +01:00
conf.h conf: add nocrossts option to hwtimestamp directive 2017-01-23 15:58:55 +01:00
configure refclock_phc: use sys_linux code for reading PHC 2017-01-23 15:58:55 +01:00
COPYING Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
getdate.h Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
getdate.y include config.h in all compiled files 2015-07-28 11:57:57 +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 include config.h in all compiled files 2015-07-28 11:57:57 +02:00
hash_tomcrypt.c Free allocated memory on exit 2014-09-25 10:57:55 +02:00
hwclock.c hwclock: make minimum sampling separation configurable 2017-01-23 15:58:55 +01:00
hwclock.h hwclock: make minimum sampling separation configurable 2017-01-23 15:58:55 +01:00
keys.c ntp: avoid truncation of NTPv4 MACs by default 2016-12-02 14:53:03 +01:00
keys.h ntp: avoid truncation of NTPv4 MACs by default 2016-12-02 14:53:03 +01:00
local.c local: add assertion for precision 2017-01-12 16:34:28 +01:00
local.h local: add support for clock_gettime() 2016-08-19 13:54:58 +02:00
localp.h adopt struct timespec 2016-08-19 12:53:09 +02:00
logging.c use correct facility in LOG messages 2016-09-07 11:16:01 +02:00
logging.h hwclock: add support for tracking hardware clocks 2016-11-10 15:26:56 +01:00
main.c fix some coverity warnings 2017-01-12 16:34:27 +01:00
main.h Remove CVS headers 2011-01-28 12:56:09 +01:00
make_release make_release: update for changes in documentation 2016-05-13 16:58:07 +02:00
Makefile.in configure: use common CPPFLAGS for all objects 2016-12-08 14:47:38 +01:00
manual.c util: modify UTI_*ToDouble functions to return double directly 2016-08-19 12:53:09 +02:00
manual.h adopt struct timespec 2016-08-19 12:53:09 +02: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
nameserv.c nameserv: return at most 16 addresses from DNS_Name2IPAddress() 2016-01-13 11:25:26 +01:00
nameserv.h nameserv: return at most 16 addresses from DNS_Name2IPAddress() 2016-01-13 11:25:26 +01:00
nameserv_async.c nameserv: set CLOEXEC flag on pipe file descriptors 2016-12-13 12:57:25 +01:00
nameserv_async.h stubs: don't call DNS_Name2IPAddress handler directly 2015-09-29 18:06:33 +02:00
NEWS doc: update NEWS 2017-01-06 13:12:19 +01:00
ntp.h ntp: accept NTPv4 packets with truncated MACs 2016-12-02 14:53:03 +01:00
ntp_core.c ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
ntp_core.h cmdmon: add ntpdata command 2016-11-25 17:33:43 +01:00
ntp_io.c ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
ntp_io.h ntp: add support for processing of transmitted packets 2016-11-10 15:26:56 +01:00
ntp_io_linux.c ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
ntp_io_linux.h ntp: add interface index to NTP_Local_Address 2017-01-23 15:58:55 +01:00
ntp_signd.c ntp: add support for processing of transmitted packets 2016-11-10 15:26:56 +01:00
ntp_signd.h ntp: add support for MS-SNTP authentication in Samba 2016-07-29 10:17:33 +02:00
ntp_sources.c cmdmon: add ntpdata command 2016-11-25 17:33:43 +01:00
ntp_sources.h cmdmon: add ntpdata command 2016-11-25 17:33:43 +01:00
pktlength.c cmdmon: allow all parameters to be set for new sources 2016-12-06 16:56:38 +01:00
pktlength.h Add padding to cmdmon requests to prevent amplification attack 2014-01-30 15:59:45 +01:00
privops.c update copyright years 2016-02-02 12:02:16 +01:00
privops.h privops: add support for privileged DNS_Name2IPAddress() 2016-01-13 11:25:45 +01:00
README doc: update README 2017-01-12 16:34:28 +01:00
refclock.c refclock_phc: use sys_linux code for reading PHC 2017-01-23 15:58:55 +01:00
refclock.h refclock_phc: use sys_linux code for reading PHC 2017-01-23 15:58:55 +01:00
refclock_phc.c refclock_phc: add nocrossts option 2017-01-23 15:58:55 +01:00
refclock_pps.c refclock: use UTI_TimespecToString() in debug message 2016-09-26 12:40:43 +02:00
refclock_shm.c util: modify UTI_*ToDouble functions to return double directly 2016-08-19 12:53:09 +02:00
refclock_sock.c adopt struct timespec 2016-08-19 12:53:09 +02:00
reference.c reference: randomize reference time 2016-11-25 17:33:42 +01:00
reference.h adopt struct timespec 2016-08-19 12:53:09 +02:00
regress.c regress: remove unused struct declaration 2016-12-02 14:53:03 +01:00
regress.h regress: add linear regression with two independent variables 2016-08-11 10:45:48 +02:00
reports.h cmdmon: add ntpdata command 2016-11-25 17:33:43 +01:00
rtc.c adopt struct timespec 2016-08-19 12:53:09 +02:00
rtc.h rtc: move preinit call to RTC_Initialise() 2014-08-19 10:46:32 +02:00
rtc_linux.c rtc: check for backward RTC steps 2017-01-12 16:34:28 +01:00
rtc_linux.h rtc: restore time from driftfile if later than RTC time 2015-10-06 15:52:36 +02:00
sched.c sched: add more random bits to timeout scheduling 2016-11-15 14:55:25 +01:00
sched.h sched: add support for handling exceptions on descriptors 2016-09-26 12:40:43 +02:00
smooth.c smooth: fix selection of 1st stage direction 2016-11-21 12:02:51 +01:00
smooth.h adopt struct timespec 2016-08-19 12:53:09 +02:00
sources.c sources: try to replace jittery sources 2017-01-06 13:12:19 +01:00
sources.h sources: give access to sourcestats instance 2016-11-25 17:33:43 +01:00
sourcestats.c sourcestats: align sample time used for source report 2017-01-12 16:34:28 +01:00
sourcestats.h cmdmon: add ntpdata command 2016-11-25 17:33:43 +01:00
srcparams.h conf: increase default minsamples and polltarget 2016-12-02 14:53:03 +01:00
stubs.c stubs: rework emulation of asynchronous resolver to use pipes 2016-12-13 12:57:25 +01:00
sys.c sys: remove unused code 2015-12-10 16:30:38 +01:00
sys.h sys_linux: add support for seccomp filters 2015-09-04 17:56:51 +02:00
sys_generic.c util: modify UTI_*ToDouble functions to return double directly 2016-08-19 12:53:09 +02:00
sys_generic.h sys_generic: allow fast slewing with system driver 2015-09-23 11:19:09 +02:00
sys_linux.c sys_linux: add support for PTP_SYS_OFFSET_PRECISE 2017-01-23 15:58:55 +01:00
sys_linux.h sys_linux: add support for PTP_SYS_OFFSET_PRECISE 2017-01-23 15:58:55 +01:00
sys_macosx.c util: modify UTI_*ToDouble functions to return double directly 2016-08-19 12:53:09 +02:00
sys_macosx.h rename 'Mac OS X' to 'macOS' 2016-08-11 10:45:48 +02:00
sys_netbsd.c util: modify UTI_*ToDouble functions to return double directly 2016-08-19 12:53:09 +02:00
sys_netbsd.h sys_netbsd: allow running without root privileges 2015-08-25 17:09:55 +02:00
sys_solaris.c sys_solaris: add support for dropping root privileges 2015-12-10 16:30:38 +01:00
sys_solaris.h sys_solaris: add support for dropping root privileges 2015-12-10 16:30:38 +01:00
sys_timex.c fix some coverity warnings 2017-01-12 16:34:27 +01:00
sys_timex.h sys_timex: move inclusion of sys/timex.h to sysincl.h 2015-12-10 16:30:38 +01:00
sysincl.h sys_timex: move inclusion of sys/timex.h to sysincl.h 2015-12-10 16:30:38 +01:00
tempcomp.c use correct facility in LOG messages 2016-09-07 11:16:01 +02:00
tempcomp.h Update copyright 2011-01-27 13:05:26 +01:00
util.c util: handle zero in conversion of NTP timestamps 2017-01-12 16:34:28 +01:00
util.h util: move authentication and password decoding functions to keys 2016-12-02 14:53:03 +01:00

This is the README for chrony.

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

chrony is a versatile implementation of the Network Time Protocol (NTP).
It can synchronize the system clock with NTP servers, reference clocks
(e.g. GPS receiver), and manual input using wristwatch and keyboard.
It can also operate as an NTPv4 (RFC 5905) server and peer to provide
a time service to other computers in the network.

It is designed to perform well in a wide range of conditions, including
intermittent network connections, heavily congested networks, changing
temperatures (ordinary computer clocks are sensitive to temperature),
and systems that do not run continuosly, or run on a virtual machine.

Typical accuracy between two machines synchronised over the Internet is
within a few milliseconds; on a LAN, accuracy is typically in tens of
microseconds.  With hardware timestamping, or a hardware reference clock,
sub-microsecond accuracy may be possible.

Two programs are included in chrony, chronyd is a daemon that can be
started at boot time and 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.

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

The software is known to work on Linux, FreeBSD, NetBSD, macOS and
Solaris.  Closely related systems may work too.  Any other system will
likely 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 

    https://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.

When you are reporting a bug, please send us all the information you can.
Unfortunately, chrony has proven to be one of those programs where it is very
difficult to reproduce bugs in a different environment. So we may have to
interact with you quite a lot to obtain enough extra logging and tracing to
pin-point the problem in some cases. Please be patient and plan for this!

License
=======

chrony is distributed under the GNU General Public License version 2.

Authors
=======

Richard P. Curnow <rc@rc0.org.uk>
Miroslav Lichvar <mlichvar@redhat.com>

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

In writing the chronyd program, extensive use has been made of RFC 1305
and RFC 5905, written by David Mills. The source code of the NTP reference
implementation has been used to check the details of the protocol.

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

Lonnie Abelbeck <lonnie@abelbeck.com>
    Patch to add tab-completion to chronyc

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

Bryan Christianson <bryan@whatroute.net>
    Support for macOS
    Support for privilege separation
    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.

Andrew Griffiths <agriffit@redhat.com>
    Patch to add support for seccomp filter

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

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

Denny Page <dennypage@me.com>
    Advice on support for hardware timestamping

Gautier PHILIPPON <gautier.philippon@ensimag.grenoble-inp.fr>
    Patch to add refresh command to chronyc

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

Bill Unruh <unruh@physics.ubc.ca>
    Advice on statistics

Stephen Wadeley <swadeley@redhat.com>
    Improvements to man pages

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.  We are sorry
we cannot identify all of you individually.