Commit graph

316 commits

Author SHA1 Message Date
Miroslav Lichvar
21ba1d3761 Don't add \n to chronyc command line arguments
This fixes parsing of some commands.
2011-04-07 16:17:58 +02:00
Miroslav Lichvar
e79584bb9e Revert marking offline sources as unreachable 2011-04-07 14:44:56 +02:00
Miroslav Lichvar
bca7819247 Don't crash when sources report is requested soon after start 2011-04-06 16:59:40 +02:00
Miroslav Lichvar
0ecabae2c3 Add include directive 2011-04-06 16:58:12 +02:00
Miroslav Lichvar
598c04eea2 Add configure option to force retry on DNS failure
This is apparently needed on system which keep nameservers specified
in /etc/resolv.conf even when there is no network connection. Should be
used with care as invalid names will be retried forever.
2011-04-05 18:14:05 +02:00
Miroslav Lichvar
faec23f6bd Don't update empty sourcestats on clock update 2011-04-05 16:32:50 +02:00
Miroslav Lichvar
896dad9224 Fix warnings produced by latest gcc 2011-02-15 18:55:34 +01:00
Miroslav Lichvar
680612cf09 Reduce Linux driver verbosity 2011-02-15 17:22:40 +01:00
Miroslav Lichvar
3fbd4bb15f Don't log error on opening driftfile
Log frequency and skew values read from the driftfile instead.
2011-02-15 16:56:30 +01:00
Miroslav Lichvar
cb9055072d Make starting log even in debug mode 2011-02-14 18:21:38 +01:00
Miroslav Lichvar
0fc9b555f1 Don't log in signal handler 2011-02-14 18:19:58 +01:00
Miroslav Lichvar
6ed58628f5 Don't use uninitialized memory when setting RTC time 2011-02-11 17:56:05 +01:00
Miroslav Lichvar
efff149988 Use system headers for Linux RTC support 2011-02-11 17:56:05 +01:00
Miroslav Lichvar
b02d4092f1 Fix compiler warnings in PPS configure test 2011-02-11 17:31:38 +01:00
Miroslav Lichvar
9dc7ea7c62 Update NEWS 2011-01-28 13:21:56 +01:00
Miroslav Lichvar
546a3cdd50 Update credits 2011-01-28 12:57:03 +01:00
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