Commit graph

41 commits

Author SHA1 Message Date
Miroslav Lichvar
e8c5d15690 Remove CVS headers 2011-01-28 12:56:09 +01:00
Miroslav Lichvar
e63cba05b2 Update copyright 2011-01-27 13:05:26 +01:00
Miroslav Lichvar
9cf08fc780 Make importance of stratum in source selection configurable
Instead of always selecting the source with minimum stratum, add weighted
stratum to the distance when comparing selectable sources. The weight
can be configured with new stratumweight directive and can be set to
zero to ignore stratum completely, by default 1.0.
2011-01-25 17:40:46 +01:00
Miroslav Lichvar
db510a9558 Select source with minimum distance using a scoring system
Each source has a score against currently selected source which is
updated (multiplied by ratio of their distances) when one of the two
sources has a new sample. When the score reaches a limit, the source
will be selected. This should allow to slowly select the source with
minimum distance without frequent reselecting.

To avoid switching between sources with very variable distances (e.g. on
LAN or when upstream server uses a longer polling interval), sources
that are currently not selected are penalized by a fixed distance. This
can be configured with new reselectdist directive (100 microseconds by
default).
2011-01-25 17:40:37 +01:00
Miroslav Lichvar
b977c95be4 Add test for ratio of increase in delay to stddev
Require that the ratio of the increase in delay from the minimum one in
the stats data register to the standard deviation of the offsets in the
register is less than maxdelaydevratio or the difference between
measured offset and predicted offset is larger than the increase in
delay. In the allowed delay increase is included also skew and maximum
clock frequency error.

maxdelaydevratio is 10.0 by default.
2010-12-07 16:47:57 +01:00
Miroslav Lichvar
cc3a8918f0 Include maximum clock frequency error in our dispersion
Add maxclockerror directive to set the stability of the clock (10 ppm by
default) and include it in our dispersion.
2010-12-03 13:15:14 +01:00
Miroslav Lichvar
7ab2c0e4a5 Add logbanner directive 2010-10-13 17:50:22 +02:00
Miroslav Lichvar
7a6ee1d729 Base poll adjustment on number of sourcestats samples
Instead of following skew changes, adjust polling interval so that the
number of measurements used in the regression algorithm remains close to
a target value. It can be configured with a new polltarget option
(6 by default).
2010-10-13 16:49:28 +02:00
Miroslav Lichvar
f924862e89 Add prefer and noselect options 2010-08-25 18:32:40 +02:00
Benny Lyne Amorsen
c8fe69c956 Add minstratum option
Stratum in received packets is raised to the configured minimum.
2010-08-25 12:46:14 +02:00
Miroslav Lichvar
a080d00352 Add rtcsync directive
The directive enables the 11 minute kernel mode. It cannot be used
when the normal RTC tracking is enabled.
2010-05-14 14:41:11 +02:00
Miroslav Lichvar
aa91c608f4 Add delayed name resolving for servers and peers
Resolving is retried in increasing intervals (maximum is one hour)
until it succeeds or fails with a non-temporary error.

Unresolved sources are included in the activity report as offline
sources and the online command can be used to retry it immediately.

This could be improved by resolving in a separate thread/process
to avoid blocking.
2010-04-27 14:35:28 +02:00
Miroslav Lichvar
3d260d41b3 Don't retry resolving in DNS_Name2IPAddress
Instead of retrying to resolve it in the function and blocking for a
long time, return a TryAgain status and let the caller retry it later if
necessary.
2010-04-27 14:35:28 +02:00
Miroslav Lichvar
2458325c09 Merge NSR/NCR server and peer functions 2010-04-27 14:35:27 +02:00
Miroslav Lichvar
ab68a9d1d3 Set maxupdateskew to 1000 ppm by default
This will prevent from using unreliable frequency estimate on iburst
when starting without drift file.
2010-04-27 14:35:27 +02:00
Miroslav Lichvar
c386d11765 Add temperature compensation
A new tempcomp directive can be used to specify a file for reading
current temperature, update interval and compensation coefficients. The
clock frequency corrections are applied in local module and are invisible
in upper layers. The measurements and corrections can be logged to
tempcomp.log file.
2010-04-27 14:35:11 +02:00
Miroslav Lichvar
f12bc10917 Add fallback drifts
Fallback drifts are long-term averages of the system clock drift
calculated over exponentially increasing intervals. They are used when
the clock is unsynchronised to avoid quickly drifting away from true
time if there was a short-term deviation in drift before the
synchronisation was lost.
2010-04-27 14:27:05 +02:00
Miroslav Lichvar
5fb5551c36 Add refclock precision 2010-03-02 14:23:54 +01:00
Miroslav Lichvar
fc1514db04 Adjust refclock filter parameters
Drop only about 40 percent of samples, change default length to 64,
require at least 4 samples between polls (or full filter for lengths
below 4).
2010-03-02 13:19:33 +01:00
Miroslav Lichvar
e261278a5c Add lock option for PPS refclocks 2010-01-28 10:10:13 +01:00
Miroslav Lichvar
8a00758cf5 Add makestep directive 2010-01-25 15:51:15 +01:00
Miroslav Lichvar
1f6e508a3d Set default chrony.conf path according to sysconfdir 2009-12-04 13:12:38 +01:00
Miroslav Lichvar
7c53aca486 Add refclocks log 2009-11-30 16:54:00 +01:00
Miroslav Lichvar
e3234465e2 Clean up system options code
Abort with error message when trying to use unsupported/disabled
system specific option.
2009-11-25 14:37:41 +01:00
Miroslav Lichvar
618f372e13 Add option to limit clientlog memory 2009-11-25 14:37:36 +01:00
Miroslav Lichvar
8e23110aec Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
Miroslav Lichvar
f7e08d0c30 Update copyrights 2009-10-28 17:53:10 +01:00
Miroslav Lichvar
b4069a4c3b Add PPS API refclock driver 2009-10-28 12:40:39 +01:00
Miroslav Lichvar
5b4e07d658 Add refclock option for delay
This is useful when refclocks don't agree on time, increasing the
delay will widen the interval used in the source selection algorithm.
2009-10-27 14:02:16 +01:00
Miroslav Lichvar
8265ff2890 Add IPv6 support 2009-10-13 14:44:33 +02:00
Miroslav Lichvar
19f3a6bca8 Fix string termination in refclock parameter parser 2009-09-09 17:12:43 +02:00
Miroslav Lichvar
67c0f1c08c Switch refclock driver parameter to string 2009-08-19 15:29:52 +02:00
Timo Teras
0666d04ab2 Set reply source IP from query destination IP
Currently, on multihomed host, when chrony is not bound to a specific
IP address, a query is sent to an interface and the default source IP
hint for the back route differs, the reply will have a source IP
different than where the query was destinied to. This will cause
problems because connection tracking firewalls will drop the replies
and most likely the client program will get confused too.

This patch uses the IP_PKTINFO mechanism to get the IP address where
received packets where targetted to and use that IP address as source
hint when sending a reply.
2009-08-07 17:02:11 +02:00
Miroslav Lichvar
735811b2b9 Add median filter for refclocks 2009-07-01 15:55:56 +02:00
Miroslav Lichvar
ac30bb06ef Add support for reference clocks 2009-05-05 23:05:59 +02:00
John Hasler
35e662d810 Add mlockall and SCHED_FIFO support
The attached patch adds support for mlockall() as well as the SCHED_FIFO
real-time scheduler. It should result in reduced (and more consistent)
latency. Usage is documented in all the documents.
2009-02-10 18:02:28 +01:00
Miroslav Lichvar
0148ecaea0 Retry name resolving after temporary failure few times before giving up
This is a temporary fix to allow starting when resolv.conf is not ready yet
(e.g. when using NetworkManager). It may delay start up to 1022 seconds.
2008-11-10 15:54:06 +01:00
richard
6672f045c2 Update copyright to 2003 2006-01-19 21:37:13 +00:00
richard
77303c285f Replace sprintf by snprintf (John Hasler) 2006-01-19 21:37:13 +00:00
richard
e3dd17c763 Fix initstepslew with no sources specified (John Hasler) 2006-01-19 21:37:13 +00:00
Richard P. Curnow
8884034104 Equivalent to V1.19.99.1
This is a verbatim copy of the files at that stage of the repository that was
built from the CVS import.  It allows future development to see a bit of recent
history, but without carrying around the baggage going back to 1997.  If that
is really required, git grafts can be used.
2006-01-19 21:34:28 +00:00