mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 17:35:06 -05:00
conf: add rawmeasurements log option
While the measurements log can be useful for debugging problems in NTP configuration (e.g. authentication failures with symmetric keys), it seems most users are interested only in valid measurements (e.g. for producing graphs) and don't expect/handle entries where some of the RFC 5905 tests 1-7 failed. Modify the measurements log option to log only valid measurements, and for debugging purposes add a new rawmeasurements option.
This commit is contained in:
9
conf.c
9
conf.c
@@ -97,6 +97,7 @@ static double combine_limit = 3.0;
|
||||
|
||||
static int cmd_port = DEFAULT_CANDM_PORT;
|
||||
|
||||
static int raw_measurements = 0;
|
||||
static int do_log_measurements = 0;
|
||||
static int do_log_statistics = 0;
|
||||
static int do_log_tracking = 0;
|
||||
@@ -814,7 +815,10 @@ parse_log(char *line)
|
||||
log_name = line;
|
||||
line = CPS_SplitWord(line);
|
||||
if (*log_name) {
|
||||
if (!strcmp(log_name, "measurements")) {
|
||||
if (!strcmp(log_name, "rawmeasurements")) {
|
||||
do_log_measurements = 1;
|
||||
raw_measurements = 1;
|
||||
} else if (!strcmp(log_name, "measurements")) {
|
||||
do_log_measurements = 1;
|
||||
} else if (!strcmp(log_name, "statistics")) {
|
||||
do_log_statistics = 1;
|
||||
@@ -1468,8 +1472,9 @@ CNF_GetDumpDir(void)
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
CNF_GetLogMeasurements(void)
|
||||
CNF_GetLogMeasurements(int *raw)
|
||||
{
|
||||
*raw = raw_measurements;
|
||||
return do_log_measurements;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user