= Statistics file formats =

The ntpd daemon can produce a variety of statistics files which are
useful for maintenance, evaluation and retrospective calibration
purposes. See the ntpd man page for instructions on how to configure
this feature. There are four file collections presently defined:
clockstats, loopstats, peerstats and temps, each of which is described
in this note.

Note: The NTPsec versions of these formats differ in that clock IDs
consist of a string drivername followed by unit number in parentheses
rather than the magic IP addresses used in NTP Classic.  The code can
be built in a Classic compatibility node that restores the old behavior.

The temps file is unique to NTPsec.

== clockstats ==

A line in this file is produced at each valid update received from a
refclock configured to append to it. The first part of each data line
is similar for all radios.

----------------------------------------------------------------------------
  49234 60517.826 SPECTRACOM(1) 93 247 16:48:21.814

  49234                modified Julian day number
  60517.826            time of day (s) past midnight UTC
  SPECTRACOM(1)        receiver identifier (Spectracom unit 1)
  93 247 16:48:21.814  timecode (format varies by refclock)
----------------------------------------------------------------------------

== loopstats ==

The following data are collected in the loopstats files. A line in the file
is produced at each valid update of the local clock.

----------------------------------------------------------------------------
  49236 11.897 -0.000004 -35.9384 0.000003815 0.000805 0

  49236             modified Julian day number
  11.897            time of day (s) past midnight UTC
  -0.000004         time offset (s)
  -35.9384          frequency offset (ppm)
  0.000003815       jitter
  0.000805          wander (ppm)
  0                 phase-lock loop time constant
----------------------------------------------------------------------------

== peerstats ==

The following data are collected in the peerstats files. A line in the file
is produced upon reception of each valid update from a configured peer.

----------------------------------------------------------------------------
  49236 30.756 140.173.96.1 9474 0.000603 0.37532

  49236             modified Julian day number
  30.756            time of day (s) past midnight UTC
  140.173.96.1      peer identifier (IP address or receiver identifier)
  9474              peer status word (hex) (see NTP specification)
  0.000603          offset (s)
  0.08929           delay (s)
  0.37532           dispersion (s)
----------------------------------------------------------------------------

== temps ==

This file is user generated.  The wide range of temperature sensors
makes it too difficult to make it a standard process.  There are
examples of programs to log data from different temperature sensors in
the contrib/ directory.

When this file exists, the ntpviz program will graph the data.

Each line in this file is one valid logged temperature.  The file can
contain data from several different thermometers.  Each line is tagged
with the data source symbolic name in field 2.

----------------------------------------------------------------------------
  1471625701 TEMPER 24.9

  1471625701           Unix time, seconds since the start of the epoch
  TEMPER               Name of the temperature source.
  24.9                 Measured temperature in degree Celsius
----------------------------------------------------------------------------

'''''

include::includes/footer.txt[]
