mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 15:35:07 -05:00
ntp: add maxdelayquant option
Add a new test for maximum delay using a long-term estimate of a p-quantile of the peer delay. If enabled, it replaces the maxdelaydevratio test. It's main advantage is that it is not sensitive to outliers corrupting the minimum delay. As it can take a large number of samples for the estimate to reach the expected value and adapt to a new value after a network change, the option is recommended only for local networks with very short polling intervals.
This commit is contained in:
@@ -102,7 +102,7 @@ limit=1
|
||||
for chronyc_conf in \
|
||||
"accheck 1.2.3.4" \
|
||||
"add peer 10.0.0.0 minpoll 2 maxpoll 6" \
|
||||
"add server 10.0.0.0 minpoll 6 maxpoll 10 iburst burst key 1 certset 2 maxdelay 1e-3 maxdelayratio 10.0 maxdelaydevratio 10.0 mindelay 1e-4 asymmetry 0.5 offset 1e-5 minsamples 6 maxsamples 6 filter 3 offline auto_offline prefer noselect trust require xleave polltarget 20 port 123 presend 7 minstratum 3 version 4 nts ntsport 4460 copy extfield F323" \
|
||||
"add server 10.0.0.0 minpoll 6 maxpoll 10 iburst burst key 1 certset 2 maxdelay 1e-3 maxdelayratio 10.0 maxdelaydevratio 10.0 maxdelayquant 0.5 mindelay 1e-4 asymmetry 0.5 offset 1e-5 minsamples 6 maxsamples 6 filter 3 offline auto_offline prefer noselect trust require xleave polltarget 20 port 123 presend 7 minstratum 3 version 4 nts ntsport 4460 copy extfield F323" \
|
||||
"add server node1.net1.clk" \
|
||||
"allow 1.2.3.4" \
|
||||
"allow 1.2" \
|
||||
|
||||
@@ -25,4 +25,18 @@ for client_server_options in "maxpoll 6 maxdelay 2e-5"; do
|
||||
check_sync && test_fail
|
||||
done
|
||||
|
||||
min_sync_time=10
|
||||
client_conf="
|
||||
logdir tmp
|
||||
log rawmeasurements"
|
||||
client_server_options="minpoll 2 maxpoll 2 maxdelayquant 0.1"
|
||||
|
||||
run_test || test_fail
|
||||
check_chronyd_exit || test_fail
|
||||
check_packet_interval || test_fail
|
||||
check_sync || test_fail
|
||||
|
||||
check_file_messages "20.*123\.1.* 111 111 1111" 200 500 measurements.log || test_fail
|
||||
check_file_messages "20.*123\.1.* 111 111 1101" 2000 2300 measurements.log || test_fail
|
||||
|
||||
test_pass
|
||||
|
||||
Reference in New Issue
Block a user