Commit graph

300 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
e8fe1dc415 Ignore reselectdist for refclocks 2011-01-25 17:51:19 +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
b712b3a979 Disable variance source test for now
It seems it triggers even with one source alone if it's close and
accurate or polling interval is long enough. It would need to include
max_clock_error.
2011-01-25 17:40:46 +01:00
Miroslav Lichvar
a931b2eece Add outlyer source status to cmdmon protocol
This is not used yet.
2011-01-25 17:40:46 +01:00
Miroslav Lichvar
2e74beebbf Print sources with bad stats in client as unreachable 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
222198acf3 Set status on doffset and dfreq commands 2011-01-19 15:29:49 +01:00
Miroslav Lichvar
bc4d5df94e Reply with status invalid instead of bad length on invalid command 2011-01-19 14:44:10 +01:00
Miroslav Lichvar
9d35b5deac Don't leak descriptors to sendmail 2011-01-18 18:07:46 +01:00
Miroslav Lichvar
59c68d240c Don't forget to shift last class dispatch timevals on step 2010-12-20 14:12:47 +01:00
Miroslav Lichvar
930a41b845 Don't send packet in last auto_offline transmit timeout 2010-12-17 18:09:10 +01:00
Miroslav Lichvar
323f0d187e Fix switching offline auto_offline source to online 2010-12-17 18:09:10 +01:00
Miroslav Lichvar
0078705bbe Enforce timeout class separation from last dispatched timeout 2010-12-17 16:09:12 +01:00
Miroslav Lichvar
3b3ca4afdc Use enum for scheduler timeout classes 2010-12-17 15:38:23 +01:00
Miroslav Lichvar
1d6b94b458 Fix crash when timeout is removed from its handler
Remove the timeout before dispatching the handler, and allow
calling SCH_RemoveTimeout() with nonexistent id.
2010-12-17 14:52:39 +01:00
Miroslav Lichvar
30c038c3c3 Make unsynchronised entry in tracking log on start 2010-12-17 13:22:57 +01:00
Miroslav Lichvar
05e002cd42 Delay selecting source on start
On start, when servers are reachable and use the same polling interval,
wait for them to have the same reachability register (which corresponds
to the number of samples in sourcestats) before selecting one.
2010-12-17 13:22:57 +01:00
Miroslav Lichvar
7f6ed73145 Don't update local reference unnecessarily
Local reference is now updated only when a new source is selected or
match_addr is equal to the selected source, match_addr 0 is no longer
treated specially.
2010-12-17 13:22:57 +01:00
Miroslav Lichvar
0c4968ec51 Track reachability in sources module
Add new flag to source struct to indicate when source is selectable
(packets with good headers are received) and use a reachability
register for last 8 samples instead of the reachable flag. Source
drivers now provide only reachability updates.
2010-12-17 13:22:29 +01:00
Miroslav Lichvar
ff69e86559 Apply jitter test only on NTP sources for now
With refclocks it seems to fail easily, users would have to set the delay
option appropriately.
2010-12-16 18:35:39 +01:00
Miroslav Lichvar
98f79404d6 Allow selecting source only when last regression was successful 2010-12-15 17:48:30 +01:00
Miroslav Lichvar
eec438a614 Fix jitter test in source selection
Distance should be compared to square root of variance.
2010-12-15 14:25:40 +01:00
Miroslav Lichvar
c88801065f Divide regression weights by stddev instead of minimum distance
This improves accuracy with large but stable network delays.
2010-12-14 17:00:53 +01:00
Miroslav Lichvar
833022b745 Add small randomness to spacing between samples for one server 2010-12-09 16:06:42 +01:00
Miroslav Lichvar
d1b820e7e3 Shorten initial delay and sampling separation to 0.2 seconds 2010-12-09 15:14:05 +01:00
Miroslav Lichvar
4373918a2f Fix separation of timeouts scheduled for exactly the same time 2010-12-09 14:34:29 +01:00
Miroslav Lichvar
6e96b4ba33 Add reselect command 2010-12-07 16:47:58 +01:00
Miroslav Lichvar
2d326bfc48 Require password for clients command 2010-12-07 16:47:58 +01:00
Miroslav Lichvar
a6988b2a79 Update chronyc help text 2010-12-07 16:47:57 +01:00
Miroslav Lichvar
8b93e1a780 Slowly back off sampling rate when selected source loses connectivity 2010-12-07 16:47:57 +01:00
Miroslav Lichvar
4e318c1abc Require valid_header before accumulating sample
Split test7 into two and to accumulate the sample require that all tests
pass, except the one which checks packet stratum is not higher than ours.

Also, don't mark the source as unreachable when only test4c fails.
2010-12-07 16:47:57 +01:00
Miroslav Lichvar
3cb6840d2d Fix log file names in documentation 2010-12-07 16:47:57 +01:00
Miroslav Lichvar
6ed5a65064 Add maxdelaydevratio command 2010-12-07 16:47:57 +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
feb8811f37 Cache minimum peer delay in sourcestats 2010-12-03 17:25:50 +01:00
Miroslav Lichvar
0de82a70a6 Keep only absolute values of peer delays in sourcestats
This saves some fabs() calls.
2010-12-03 13:17:09 +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
63ef2badd6 Fix printing of NP and NR over 99 in sourcestats 2010-12-01 14:32:26 +01:00
Miroslav Lichvar
e98080b8bb Use only 3 chars from refclock driver name in default refid 2010-11-30 18:18:28 +01:00
Miroslav Lichvar
bed5b72cbe Add polltarget command 2010-10-14 15:08:35 +02: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
d9596334c3 Move default source parameters to macros 2010-10-13 12:58:26 +02:00
Miroslav Lichvar
16676ae726 Add -m option to allow multiple commands on command line 2010-10-04 15:53:35 +02:00
Miroslav Lichvar
fd3702f973 Add retries and timeout commands 2010-10-04 15:00:07 +02:00
Miroslav Lichvar
d674d23b45 Adjust chronyc timeout
Start at 1 second and increase it exponentially with maximum number of
attempts 3.
2010-10-04 13:16:52 +02:00
Miroslav Lichvar
5b8835f46b Support prefer and noselect options in chronyc 2010-08-26 10:29:58 +02:00
Miroslav Lichvar
ddb2cf3b8b Merge code for adding NTP server and peer in cmdmon 2010-08-26 09:35:57 +02:00