ntp_mon (5) Linux Manual Page
ntp_mon – Monitoring Options
Introduction
The ntpd includes a comprehensive monitoring facility which collects statistical data of various types and writes the data to files associated with each type at defined events or intervals. The files associated with a particular type are collectively called the generation file set for that type. The files in the file set are the members of that set.
File sets have names specific to the type and generation epoch. The names are constructed from three concatenated elements prefix, filename and suffix:
-
prefix- The directory path specified in the
statsdircommand. name- The name specified by the
fileoption of thefilegencommand. suffix- A string of elements bdginning with . (dot) followed by a number of elements depending on the file set type.
Statistics files can be managed using scripts, examples of which are in the 46/scripts directory. Using these or similar scripts and Unix cron jobs, the files can be automatically summarized and archived for retrospective analysis.
Monitoring Commands
-
filegennamefilefilename[typetype] [link | nolink] [enable | disable]-
-
name- Specifies the file set type from the list in the next section.
filefilename- Specfies the file set name.
typetypename- Specifies the file set interval. The following intervals are supported with default
day:-
none- The file set is actually a single plain file.
pid- One file set member is created for every incarnation of
ntpd46 The file name suffix is the string .n, wherenis the process ID of thentpdserver process. day- One file set member is created per day. A day is defined as the period between 00:00 and 23:59 UTC. The file name suffix is the string .
yyyymmdd, whereyyyyis the year,mmthe month of the year andddthe day of the month. Thus, member created on 10 December 1992 would have suffix461992121046 week- One file set member is created per week. The week is defined as the day of year modulo 7. The file name suffix is the string .
yyyyWww, whereyyyyis the year,Wstands for itself andwwthe week number starting from 0. For example, The member created on 10 January 1992 would have suffix461992W146 month- One file set member is created per month. The file name suffix is the string .
yyyymm, whereyyyyis the year andmmthe month of the year starting from 1. For example, The member created on 10 January 1992 would have suffix4619920146 year- One file set member is generated per year. The file name suffix is the string .
yyyy, whereyyyyis the year. For example, The member created on 1 January 1992 would have suffix46199246 age- One file set member is generated every 24 hours of
ntpdoperation. The filename suffix is the string46adddddddd, whereastands for itself andddddddddis thentpdrunning time in seconds at the start of the corresponding 24-hour period.
-
link | nolink- It is convenient to be able to access the current file set members by file name, but without the suffix. This feature is enabled by
linkand disabled bynolink46 If enabled, which is the default, a hard link from the current file set member to a file without suffix is created. When there is already a file with this name and the number of links to this file is one, it is renamed by appending a dot, the letterC, and the pid of thentpdserver process. When the number of links is greater than one, the file is unlinked. This allows the current file to be accessed by a constant name. enable | disable- Enable or disable the recording function, with default
enable46 These options are intended for remote configutation commands.
-
statsdirdirectory_path- Specify the directory path prefix for statistics file names.
File Set Types
-
clockstats- Record reference clock statistics. Each update received from a reference clock driver appends one line to the
clockstatsfile set:49213 525.624 127.127.4.1 93 226 00:08:29.606 DItem Units Description 49213MJD date 525.624s time past midnight 127.127.4.1IP reference clock address message text log message The message field includes the last timecode received in decoded ASCII format, where meaningful. In some cases a good deal of additional information is displayed. See information specific to each reference clock for further details.
cryptostats- Record significant events in the Autokey protocol. This option requires the OpenSSL cryptographic software library. Each event appends one line to the
cryptostatsfile set:49213 525.624 128.4.1.1messageItem Units Description 49213MJD date 525.624s time past midnight 128.4.1.1IP source address ( 0.0.0.0for system)message text log message The message field includes the message type and certain ancillary information. See the Authentication Options page for further information.
loopstats- Record clock discipline loop statistics. Each system clock update appends one line to the
loopstatsfile set:50935 75440.031 0.000006019 13.778 0.000351733 0.013380 6Item Units Description 50935MJD date 75440.031s time past midnight 0.000006019s clock offset 13.778PPM frequency offset 0.000351733s RMS jitter 0.013380PPM RMS frequency jitter (aka wander) 6log2 s clock discipline loop time constant peerstats- Record peer statistics. Each NTP packet or reference clock update received appends one line to the
peerstatsfile set:48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674Item Units Description 48773MJD date 10847.650s time past midnight 127.127.4.1IP source address 9714hex status word -0.001605376s clock offset 0.000000000s roundtrip delay 0.001424877s dispersion 0.000958674s RMS jitter The status field is encoded in hex format as described in Appendix B of the NTP specification RFC 1305.
protostats- Record significant peer, system and [rptpcp; events. Each significant event appends one line to the
protostatsfile set:49213 525.624 128.4.1.1 963a 8amessageItem Units Description 49213MJD date 525.624s time past midnight 128.4.1.1IP source address ( 0.0.0.0for system)963acode status word 8acode event message code message text event message The event message code and message field are described on the Event Messages and Status Words page.
rawstats- Record timestamp statistics. Each NTP packet received appends one line to the
rawstatsfile set:50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000Item Units Description 50928MJD date 2132.543s time past midnight 128.4.1.1IP source address 128.4.1.20IP destination address 3102453281.584327000NTP s origin timestamp 3102453281.586228000NTP s receive timestamp 3102453332.540806000NTP s transmit timestamp 3102453332.541458000NTP s destination timestamp sysstats- Record system statistics. Each hour one line is appended to the
sysstatsfile set in the following format:50928 2132.543 3600 81965 0 9546 56 512 540 10 4 147 1Item Units Description 50928MJD date 2132.543s time past midnight 3600s time since reset 81965# packets received 0# packets for this host 9546# current versions 56# old version 512# access denied 540# bad length or format 10# bad authentication 4# declined 147# rate exceeded 1# kiss-o’-death packets sent timingstats- (Only available when the deamon is compiled with process time debugging support (–enable-debug-timing – costs performance). Record processing time statistics for various selected code paths.
53876 36.920 10.0.3.5 1 0.000014592 input processing delayItem Units Description 53876MJD date 36.920s time past midnight 10.0.3.5IP server address 1# event count 0.000014592s total time message text code path description (see source)
See Also
ntp.conf(5), ntp_decode(5) The official HTML documentation. This file was automatically generated from HTML source.
