]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sourcestats: report asymmetry in statistics log
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 10 Aug 2016 14:17:51 +0000 (16:17 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 11 Aug 2016 09:24:48 +0000 (11:24 +0200)
doc/chrony.conf.adoc
sourcestats.c

index 995c1c770637c245ee349336dd5b7ea64960e966..af6f4cf78c1c078a389d5b846445c3215e50f48f 100644 (file)
@@ -1485,8 +1485,8 @@ _statistics.log_. An example line (which actually appears as a single line in
 the file) from the log file is shown below.
 +
 ----
-2015-07-22 05:40:50 203.0.113.15     6.261e-03 -3.247e-03 \
-     2.220e-03  1.874e-06  1.080e-06 7.8e-02  16   0   8
+2016-08-10 05:40:50 203.0.113.15     6.261e-03 -3.247e-03 \
+     2.220e-03  1.874e-06  1.080e-06 7.8e-02  16   0   8  0.00
 ----
 +
 The columns are as follows (the quantities in square brackets are the values
@@ -1521,6 +1521,11 @@ from the example line above):
   to be discarded. The number of runs for the data that is being retained is
   tabulated. Values of approximately half the number of samples are expected.
   [8]
+. The estimated asymmetry of network jitter on the path to the source which was
+  used to correct the measured offsets. The asymmetry can be between -0.5 and
+  0.5. A negative value means the delay of packets sent to the source is
+  more variable than the delay of packets sent from the source back. [0.00,
+  i.e. no correction for asymmetry]
 +
 *tracking*:::
 This option logs changes to the estimate of the system's gain or loss rate, and
index a15cb41c49037b75dc13299d7a42d38e53fe1c7a..028f5a9b570dac38b18f738cdd9c7cda0b469780 100644 (file)
@@ -181,7 +181,7 @@ void
 SST_Initialise(void)
 {
   logfileid = CNF_GetLogStatistics() ? LOG_FileOpen("statistics",
-      "   Date (UTC) Time     IP Address    Std dev'n Est offset  Offset sd  Diff freq   Est skew  Stress  Ns  Bs  Nr")
+      "   Date (UTC) Time     IP Address    Std dev'n Est offset  Offset sd  Diff freq   Est skew  Stress  Ns  Bs  Nr  Asym")
     : -1;
 }
 
@@ -552,17 +552,14 @@ SST_DoNewRegression(SST_Stats inst)
               inst->asymmetry, inst->asymmetry_run);
 
     if (logfileid != -1) {
-      LOG_FileWrite(logfileid, "%s %-15s %10.3e %10.3e %10.3e %10.3e %10.3e %7.1e %3d %3d %3d",
+      LOG_FileWrite(logfileid, "%s %-15s %10.3e %10.3e %10.3e %10.3e %10.3e %7.1e %3d %3d %3d %5.2f",
               UTI_TimeToLogForm(inst->offset_time.tv_sec),
               inst->ip_addr ? UTI_IPToString(inst->ip_addr) : UTI_RefidToString(inst->refid),
               sqrt(inst->variance),
-              inst->estimated_offset,
-              inst->estimated_offset_sd,
-              inst->estimated_frequency,
-              inst->skew,
-              stress,
-              inst->n_samples,
-              best_start, nruns);
+              inst->estimated_offset, inst->estimated_offset_sd,
+              inst->estimated_frequency, inst->skew, stress,
+              inst->n_samples, best_start, inst->nruns,
+              inst->asymmetry);
     }
 
     times_back_start = inst->runs_samples + best_start;