Commit graph

60 commits

Author SHA1 Message Date
Miroslav Lichvar
6ca73bf670 Cleanup including of system headers 2013-06-14 13:41:16 +02:00
Miroslav Lichvar
52272f4dc5 Limit sources included in combining
Combine only sources whose distance is shorter than distance of the
selected source multiplied by the value of combinelimit and their
estimated frequencies are close to the frequency of the selected source.
Add outlyer status for sources which are selectable, but not included in
the combining. The status is displayed as '-' in the chronyc sources
output.
2013-06-12 10:25:46 +02:00
Miroslav Lichvar
359d444343 Remove unncessary return statements 2013-05-21 15:08:34 +02:00
Miroslav Lichvar
72d0b3c913 Create sockets only in selected family with -4 or -6 option 2013-05-20 15:37:25 +02:00
Miroslav Lichvar
0f8def4ca4 Refactor command parsing
- normalize command line before parsing
- compare whole words
- check for missing/extra arguments in config parsing
- use strdup for string allocation
- share code for reporting syntax errors
- avoid using function pointers
- cleanup the code a bit
2013-05-15 11:27:38 +02:00
Miroslav Lichvar
0c738d84af Update copyright years 2012-02-28 13:11:56 +01:00
Miroslav Lichvar
824e86a82f Add leap status to tracking log and report 2012-02-24 11:06:20 +01:00
Miroslav Lichvar
19b3c5be26 Extend tracking, sources and activity reports 2012-02-03 17:22:53 +01:00
Miroslav Lichvar
c7d0232bb1 Introduce offset correction rate
We want to correct the offset quickly, but we also want to keep the
frequency error caused by the correction itself low.

Define correction rate as the area of the region bounded by the graph of
offset corrected in time. Set the rate so that the time needed to correct
an offset equal to the current sourcestats stddev will be equal to the
update interval (assuming linear adjustment). The offset and the
time needed to make the correction are inversely proportional.

This is only a suggestion and it's up to the system driver how the
adjustment will be executed.
2011-11-15 12:27:44 +01:00
Miroslav Lichvar
777303f130 Add support for different authentication hashes
Allow different hash functions to be used in the NTP and cmdmon
protocols. This breaks the cmdmon protocol compatibility. Extended key
file format is used to specify the hash functions for chronyd and new
authhash command is added to chronyc. MD5 is the default and the only
function included in the chrony source code, other functions will be
available from libraries.
2011-11-02 13:53:00 +01:00
Miroslav Lichvar
da2c8d9076 Use config.h 2011-05-24 18:07:06 +02:00
Miroslav Lichvar
bc7586b3f4 Assert there are no unhandled commands in cmdmon 2011-04-07 18:34:47 +02:00
Miroslav Lichvar
8d3d45ea1a Add reselectdist command 2011-04-07 18:16:39 +02: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
a931b2eece Add outlyer source status to cmdmon protocol
This is not used yet.
2011-01-25 17:40:46 +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
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
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
bed5b72cbe Add polltarget command 2010-10-14 15:08:35 +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
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
Miroslav Lichvar
f924862e89 Add prefer and noselect options 2010-08-25 18:32:40 +02:00
Miroslav Lichvar
78300d018a Add minstratum command 2010-08-25 17:43:17 +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
6b0198c2d7 Replace all CROAK calls with assert or LOG_FATAL
Remove croak() and use assert() or LOG_FATAL() everywhere. Hopefully
the problems with debugging mentioned in the croak() comment are long gone.
2010-08-12 14:30:05 +02:00
Miroslav Lichvar
6dcf3238f6 Clarify some cmdmon warning messages 2010-06-14 09:47:07 +02:00
Miroslav Lichvar
2458325c09 Merge NSR/NCR server and peer functions 2010-04-27 14:35:27 +02:00
Miroslav Lichvar
93b5b08bed Add iburst server option 2010-04-27 14:35:27 +02:00
Miroslav Lichvar
e78e65ef22 Refactor file logging 2010-04-13 15:16:41 +02:00
Miroslav Lichvar
20d898d182 Prepare for handling offset correction error 2010-02-16 17:46:42 +01:00
Miroslav Lichvar
032ac800aa Limit rate of syslog messages
Error messages caused by incoming packets need to be rate limited
to avoid filling up disk space.
2010-02-04 13:07:19 +01:00
Miroslav Lichvar
5e86eeacfb Don't reply to invalid chronyc packets 2010-02-04 13:07:19 +01:00
Miroslav Lichvar
8a00758cf5 Add makestep directive 2010-01-25 15:51:15 +01:00
Miroslav Lichvar
b32432c232 Move estimated offset and error to sourcestats report
And print the estimated offset in sourcestats output.
2009-12-14 10:34:33 +01:00
Miroslav Lichvar
2dd9f3373b Replace integer microseconds in reports with floating-point values 2009-12-13 15:00:10 +01:00
Miroslav Lichvar
5b1a8705cf Remove resid_freq and resid_skew from source report
They were not printed and they are also in sourcestats report.
2009-12-13 11:07:45 +01:00
Miroslav Lichvar
b49470117d Replace fixed-point format with floating-point in cmdmon protocol 2009-12-13 11:07:34 +01:00
Miroslav Lichvar
365834535e Use exact address size in bind and sendto calls
Apparently this is needed on some systems, otherwise the calls
return EINVAL.
2009-12-07 12:51:56 +01:00
Miroslav Lichvar
41580fe589 Add flags field to chronyc add source request
This will allow adding new flags without breaking compatibility.
2009-12-02 15:22:16 +01:00
Miroslav Lichvar
7c53aca486 Add refclocks log 2009-11-30 16:54:00 +01:00
Miroslav Lichvar
032838b1b0 Add new cmdmon status codes for packet version and length mismatch
With next procotol version this will allow chronyc to report that
chronyd is using a different protocol version.
2009-11-25 14:37:41 +01:00
Miroslav Lichvar
3bae6c3202 Make some socket error messages more descriptive 2009-11-25 14:37:40 +01:00
Miroslav Lichvar
8e23110aec Update COPYING and FSF address 2009-10-28 17:53:33 +01:00