phc2sys: Add described device to stats output
When phc2sys synced more than one ethernet interface, such as in a JBOD boundary clock arrangement, it was unclear which interface a line of statistics referred to. Previous output: phc2sys[583.098]: sys offset -32 s2 freq +131974 delay 3871 phc2sys[583.098]: sys offset 33 s2 freq +125746 delay 4095 phc2sys[583.098]: sys offset -73 s2 freq +125720 delay 4128 phc2sys[583.098]: sys offset -19 s2 freq +133265 delay 3888 phc2sys[583.098]: sys offset 2 s2 freq +131986 delay 3920 Now: phc2sys[583.098]: eth9 sys offset -32 s2 freq +131974 delay 3871 phc2sys[583.098]: eth8 sys offset 33 s2 freq +125746 delay 4095 phc2sys[583.098]: eth7 sys offset -73 s2 freq +125720 delay 4128 phc2sys[583.098]: eth6 sys offset -19 s2 freq +133265 delay 3888 phc2sys[583.098]: eth1 sys offset 2 s2 freq +131986 delay 3920 Signed-off-by: Cliff Spradlin <cspradlin@google.com>master
parent
7c6a9862fd
commit
6b18e12b9b
18
phc2sys.c
18
phc2sys.c
|
@ -443,15 +443,19 @@ static void update_clock_stats(struct clock *clock, unsigned int max_count,
|
||||||
stats_get_result(clock->freq_stats, &freq_stats);
|
stats_get_result(clock->freq_stats, &freq_stats);
|
||||||
|
|
||||||
if (!stats_get_result(clock->delay_stats, &delay_stats)) {
|
if (!stats_get_result(clock->delay_stats, &delay_stats)) {
|
||||||
pr_info("rms %4.0f max %4.0f "
|
pr_info("%s "
|
||||||
|
"rms %4.0f max %4.0f "
|
||||||
"freq %+6.0f +/- %3.0f "
|
"freq %+6.0f +/- %3.0f "
|
||||||
"delay %5.0f +/- %3.0f",
|
"delay %5.0f +/- %3.0f",
|
||||||
|
clock->device,
|
||||||
offset_stats.rms, offset_stats.max_abs,
|
offset_stats.rms, offset_stats.max_abs,
|
||||||
freq_stats.mean, freq_stats.stddev,
|
freq_stats.mean, freq_stats.stddev,
|
||||||
delay_stats.mean, delay_stats.stddev);
|
delay_stats.mean, delay_stats.stddev);
|
||||||
} else {
|
} else {
|
||||||
pr_info("rms %4.0f max %4.0f "
|
pr_info("%s "
|
||||||
|
"rms %4.0f max %4.0f "
|
||||||
"freq %+6.0f +/- %3.0f",
|
"freq %+6.0f +/- %3.0f",
|
||||||
|
clock->device,
|
||||||
offset_stats.rms, offset_stats.max_abs,
|
offset_stats.rms, offset_stats.max_abs,
|
||||||
freq_stats.mean, freq_stats.stddev);
|
freq_stats.mean, freq_stats.stddev);
|
||||||
}
|
}
|
||||||
|
@ -499,12 +503,14 @@ static void update_clock(struct node *node, struct clock *clock,
|
||||||
update_clock_stats(clock, node->stats_max_count, offset, ppb, delay);
|
update_clock_stats(clock, node->stats_max_count, offset, ppb, delay);
|
||||||
} else {
|
} else {
|
||||||
if (delay >= 0) {
|
if (delay >= 0) {
|
||||||
pr_info("%s offset %9" PRId64 " s%d freq %+7.0f "
|
pr_info("%s %s offset %9" PRId64 " s%d freq %+7.0f "
|
||||||
"delay %6" PRId64,
|
"delay %6" PRId64,
|
||||||
node->master->source_label, offset, state, ppb, delay);
|
clock->device, node->master->source_label,
|
||||||
|
offset, state, ppb, delay);
|
||||||
} else {
|
} else {
|
||||||
pr_info("%s offset %9" PRId64 " s%d freq %+7.0f",
|
pr_info("%s %s offset %9" PRId64 " s%d freq %+7.0f",
|
||||||
node->master->source_label, offset, state, ppb);
|
clock->device, node->master->source_label,
|
||||||
|
offset, state, ppb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue