if ((command == NULL) || ((strcmp(command, "T") == 0) && (ip_list == NULL))) {
// clear all the flags
+ debug(2, "Stop monitoring.");
int client_id = get_client_id(smi_name); // create the record if it doesn't exist
if (client_id != -1) {
/*
if (t == -1)
t = create_clock_source_record(new_ip, clock_private_info);
if (t != -1) { // if the clock table is not full, show it's a timing peer
+ debug(2, "Monitor clock at %s.", new_ip);
clock_private_info[t].client_flags[client_id] |= (1 << clock_is_master);
}
// otherwise, drop it
}
-
-
}
if ((clock_private_info->previous_offset_time != 0) && (jitter > -10000000)) {
if (jitter < 0) {
- if (mastership_time < 1000000000) // at the beginning
+ if (mastership_time < 1000000000) // at the beginning, if jitter is negative
smoothed_offset = clock_private_info->previous_offset + jitter / 16;
else
- smoothed_offset = clock_private_info->previous_offset + jitter / 64;
- } else if (mastership_time < 1000000000) // at the beginning
+ smoothed_offset = clock_private_info->previous_offset + jitter / 64; // later, if jitter is negative
+ } else if (mastership_time < 1000000000) { // at the beginning
smoothed_offset =
- clock_private_info->previous_offset + jitter / 1; // accept positive changes quickly
- else
- smoothed_offset = clock_private_info->previous_offset + jitter / 64;
+ clock_private_info->previous_offset + jitter / 1; // at the beginning, if jitter is positive -- accept positive changes quickly
+ } else {
+ smoothed_offset = clock_private_info->previous_offset + jitter / 64; // later, if jitter is positive
+ }
} else {
// allow samples to disappear for up to a second
if ((time_since_previous_offset != 0) && (time_since_previous_offset < 1000000000) &&
// only process it if it's a master somewhere...
if ((is_a_master != 0) && (clocks_private[i].announcements_without_followups == 3)) {
+ if (clocks_private[i].follow_up_number == 0) {
debug(1,
"Attempt to awaken a silent clock %" PRIx64
", index %u, at follow_up_number %u at IP %s.",
send_awakening_announcement_sequence(
clocks_private[i].clock_id, clocks_private[i].ip, clocks_private[i].family,
clocks_private[i].grandmasterPriority1, clocks_private[i].grandmasterPriority2);
+ } else {
+ debug(1,
+ "Silent clock %" PRIx64
+ " detected, index %u, at follow_up_number %u at IP %s. No attempt to awaken it.",
+ clocks_private[i].clock_id, i, clocks_private[i].follow_up_number,
+ clocks_private[i].ip);
+ }
}
}