How to interpret certain header fields in chrony's statistics and tracking log files?

303 views Asked by At

When generating the statistics and tracking logs from chrony, I see the following headers (along with the accompanying data):

Tracking:

=== Date (UTC), Time, IP Address, St, Freq ppm, Skew ppm, Offset, L, Co, Offset sd, Rem. corr., Root delay, Root disp., Max. error ===

Statistics:

=== Date (UTC), Time, IP Address, Std dev'n, Est offset, Offset sd, Diff freq, Est skew, Stress, Ns, Bs, Nr, Asym ===

For the tracking file, I'm trying to understand what the following mean:

  • Co
  • Rem. corr.
  • Max. error

For the statistics file, I'm trying to understand the following:

  • Est offset (vs the regular offset)
  • Diff freq
  • Stress
  • Ns, Bs, Nr, and Asym

I'd appreciate any guidance or links to documentation that explains what these variables represent. Thanks.

I read through the chrony documentation online (https://chrony.tuxfamily.org/faq.html) and found good information on most of the fields in the tracking log; I could not find information on all of them, however. I was also not able to find much information on the header fields in the statistics log.

1

There are 1 answers

0
nealmcb On

I had the same question. Thanks for asking!

I found this man page (after puzzling out some info from the online source, below) Ubuntu Manpage: chrony.conf - chronyd configuration file


Earlier answer....

To move us in the right direction, I decided it was time to Use the Source, Luke, and found the write_log() function in reference.c.

reference.c is the file that prints the tracking.log file, including the header you shared.

Co comes from the integer variable combined_sources, and seems to be the number of reference sources which are being used.

Rem. corr. comes from uncorrected_offset.

Other relevant tidbits include:

last_sys_offset = offset - uncorrected_offset;
...
max_error = orig_root_distance + fabs(last_sys_offset)

I'm still not sure what Rem. corr. or max_error really are, but perhaps this helps us decipher them.

reference.h has some useful comments.


sourcestats.c produces the statistics.log file.

Est offset comes from estimated_offset about which it says this. I guess they may just be noting that they can only estimate the offset statistically, vs knowing the actual current value:

  /* This is the estimated offset (+ve => local fast) at a particular time */
  double estimated_offset;

The other values come from these variables:

Diff freq: inst->estimated_frequency /* This value contains the estimated frequency. This is the number of seconds that the local clock gains relative to the reference source per unit local time. (Positive => local clock fast, negative => local clock slow) */

Ns: inst->n_samples /* Number of samples currently stored. The samples are stored in circular buffer. */

Bs: best_start

Nr: inst->nruns /* Number of runs of the same sign amongst the residuals */

Asym: inst->asymmetry /* the latest estimated asymmetry of network jitter */

Again, sourcestats.h documents the functions, providing more hints.