mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
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).
This commit is contained in:
8
client.c
8
client.c
@@ -936,6 +936,11 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
break;
|
||||
}
|
||||
|
||||
if (data.params.poll_target != SRC_DEFAULT_POLLTARGET) {
|
||||
fprintf(stderr, "Option polltarget not supported\n");
|
||||
break;
|
||||
}
|
||||
|
||||
msg->data.ntp_source.port = htonl((unsigned long) data.port);
|
||||
UTI_IPHostToNetwork(&data.ip_addr, &msg->data.ntp_source.ip_addr);
|
||||
msg->data.ntp_source.minpoll = htonl(data.params.minpoll);
|
||||
@@ -983,6 +988,9 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
case CPS_BadMinstratum:
|
||||
fprintf(stderr, "Unreadable minstratum value\n");
|
||||
break;
|
||||
case CPS_BadPolltarget:
|
||||
fprintf(stderr, "Unreadable polltarget value\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user