19c2daa00SOllivier Robert<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 29c2daa00SOllivier Robert 39c2daa00SOllivier Robert<html> 49c2daa00SOllivier Robert 59c2daa00SOllivier Robert <head> 6ea906c41SOllivier Robert <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 79c2daa00SOllivier Robert <meta name="generator" content="HTML Tidy, see www.w3.org"> 89c2daa00SOllivier Robert <title>Monitoring Options</title> 99c2daa00SOllivier Robert <link href="scripts/style.css" type="text/css" rel="stylesheet"> 109c2daa00SOllivier Robert </head> 119c2daa00SOllivier Robert 129c2daa00SOllivier Robert <body> 139c2daa00SOllivier Robert <h3>Monitoring Options</h3> 149c2daa00SOllivier Robert <img src="pic/pogo8.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a> 159c2daa00SOllivier Robert <p>The pig watches the logs.</p> 16ea906c41SOllivier Robert <p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">00:40</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="290">Sunday, December 24, 2006</csobj></p> 179c2daa00SOllivier Robert <br clear="left"> 189c2daa00SOllivier Robert <h4>Related Links</h4> 199c2daa00SOllivier Robert <script type="text/javascript" language="javascript" src="scripts/links7.txt"></script> 209c2daa00SOllivier Robert <hr> 219c2daa00SOllivier Robert <tt>ntpd</tt> includes a comprehensive monitoring facility suitable for continuous, long term recording of server and client timekeeping performance. See the <tt>statistics</tt> command below for a listing and example of each type of statistics currently supported. Statistic files are managed using file generation sets and scripts in the <tt>./scripts</tt> directory of this distribution. Using these facilities and Unix <tt>cron</tt> jobs, the datacan be automatically summarized and archived for retrospective analysis. 229c2daa00SOllivier Robert <h4>Monitoring Commands</h4> 239c2daa00SOllivier Robert <dl> 249c2daa00SOllivier Robert <dt><tt>statistics <i>name</i> [...]</tt> 25ea906c41SOllivier Robert <dd>Enables writing of statistics records. Currently, six kinds of <i><tt>name</tt></i>statistics are supported. 269c2daa00SOllivier Robert <dl> 279c2daa00SOllivier Robert <dt><tt>clockstats</tt> 289c2daa00SOllivier Robert <dd>Enables recording of clock driver statistics information. Each update received from a clock driver appends a line of the following form to the file generation set named <tt>clockstats</tt>: 299c2daa00SOllivier Robert <dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt> 309c2daa00SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the clock address in dotted-quad notation, The final field shows the last timecode received from the clock in decoded ASCII format, where meaningful. In some clock drivers a good deal of additional information can be gathered and displayed as well. See information specific to each clock for further details. 319c2daa00SOllivier Robert <dt><tt>cryptostats</tt> 329c2daa00SOllivier Robert <dd>This option requires the OpenSSL cryptographic software library. It enables recording of cryptographic public key protocol information. Each message received by the protocol module appends a line of the following form to the file generation set named <tt>cryptostats</tt>: 339c2daa00SOllivier Robert <dd><tt>49213 525.624 127.127.4.1 <i>message</i></tt> 349c2daa00SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field shows the peer address in dotted-quad notation, The final <tt><i>message</i></tt> field includes the message type and certain ancillary information. See the <a href="authopt.html">Authentication Options</a> page for further information. 359c2daa00SOllivier Robert <dt><tt>loopstats</tt> 369c2daa00SOllivier Robert <dd>Enables recording of loop filter statistics information. Each update of the local clock outputs a line of the following form to the file generation set named <tt>loopstats</tt>: 37ea906c41SOllivier Robert <dd><tt>50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806 6</tt> 389c2daa00SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next five fields show time offset (seconds), frequency offset (parts per million - PPM), RMS jitter (seconds), Allan deviation (PPM) and clock discipline time constant. 399c2daa00SOllivier Robert <dt><tt>peerstats</tt> 409c2daa00SOllivier Robert <dd>Enables recording of peer statistics information. This includes statistics records of all peers of a NTP server and of special signals, where present and configured. Each valid update appends a line of the following form to the current element of a file generation set named <tt>peerstats</tt>: 419c2daa00SOllivier Robert <dt><tt>48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674</tt> 42ea906c41SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next two fields show the peer address in dotted-quad notation and status, respectively. The status field is encoded in hex in the format described in Appendix B of the NTP specification RFC 1305. The final four fields show the offset, delay, dispersion and RMS jitter, all in seconds. 439c2daa00SOllivier Robert <dt><tt>rawstats</tt> 449c2daa00SOllivier Robert <dd>Enables recording of raw-timestamp statistics information. This includes statistics records of all peers of a NTP server and of special signals, where present and configured. Each NTP message received from a peer or clock driver appends a line of the following form to the file generation set named <tt>rawstats</tt>: 459c2daa00SOllivier Robert <dt><tt>50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000</tt> 469c2daa00SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next two fields show the remote peer or clock address followed by the local address in dotted-quad notation, The final four fields show the originate, receive, transmit and final NTP timestamps in order. The timestamp values are as received and before processing by the various data smoothing and mitigation algorithms. 479c2daa00SOllivier Robert <dt><tt>sysstats</tt> 489c2daa00SOllivier Robert <dd>Enables recording of <tt>ntpd</tt> statistics counters on a periodic basis. Each hour a line of the following form is appended to the file generation set named <tt>sysstats</tt>: 499c2daa00SOllivier Robert <dd><tt>50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147</tt> 50ea906c41SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The remaining ten fields show the statistics counter values accumulated since the last generated line. 51ea906c41SOllivier Robert <dl> 529c2daa00SOllivier Robert <dt>Time since restart <tt>36000</tt> 53ea906c41SOllivier Robert <dd>Time in hours since the system was last rebooted. 54ea906c41SOllivier Robert <dt>Packets received <tt>81965</tt> 559c2daa00SOllivier Robert <dd>Total number of packets received. 569c2daa00SOllivier Robert <dt>Packets processed <tt>0</tt> 579c2daa00SOllivier Robert <dd>Number of packets received in response to previous packets sent 589c2daa00SOllivier Robert <dt>Current version <tt>9546</tt> 599c2daa00SOllivier Robert <dd>Number of packets matching the current NTP version. 609c2daa00SOllivier Robert <dt>Previous version <tt>56</tt> 61ea906c41SOllivier Robert <dd>Number of packets matching the previous NTP version. 62ea906c41SOllivier Robert <dt>Bad version <tt>71793</tt> 63ea906c41SOllivier Robert <dd>Number of packets matching neither NTP version. 64ea906c41SOllivier Robert <dt>Access denied <tt>512</tt> 659c2daa00SOllivier Robert <dd>Number of packets denied access for any reason. 669c2daa00SOllivier Robert <dt>Bad length or format <tt>540</tt> 679c2daa00SOllivier Robert <dd>Number of packets with invalid length, format or port number. 689c2daa00SOllivier Robert <dt>Bad authentication <tt>10</tt> 69ea906c41SOllivier Robert <dd>Number of packets not verified as authentic. 70ea906c41SOllivier Robert <dt>Rate exceeded <tt>147</tt> 719c2daa00SOllivier Robert <dd>Number of packets discarded due to rate limitation. 729c2daa00SOllivier Robert </dl> 73ea906c41SOllivier Robert <dt><tt>timingstats</tt> 74ea906c41SOllivier Robert <dd><b>ONLY</b> available when the deamon is compiled with process time debugging support (--enable-debug-timing - costs performance). Enables recording of <tt>ntpd</tt> processing time information for various selected code paths: 75ea906c41SOllivier Robert <dd><tt>53876 36.920 10.0.3.5 1 0.000014592 input processing delay</tt> 76ea906c41SOllivier Robert <dd>The first two fields show the date (Modified Julian Day) and time (seconds and fraction past UTC midnight). The next field is a potential <tt>peer address</tt>, <tt>-</tt> or <tt>-REFCLOCK-</tt> depending on the associated io source. Then an event count for the number of processed events in the code path follows. The fifth field is the total time spend for the events. The rest of the line denotes the code path description (see source for more information). 779c2daa00SOllivier Robert <dt><tt>statsdir <i>directory_path</i></tt> 789c2daa00SOllivier Robert <dd>Indicates the full path of a directory where statistics files should be created (see below). This keyword allows the (otherwise constant) <tt>filegen</tt> filename prefix to be modified for file generation sets, which is useful for handling statistics logs. 799c2daa00SOllivier Robert <dt><tt>filegen <i>name</i> [file <i>filename</i>] [type <i>typename</i>] [link | nolink] [enable | disable]</tt> 809c2daa00SOllivier Robert <dd>Configures setting of generation file set <i>name</i>. Generation file sets provide a means for handling files that are continuously growing during the lifetime of a server. Server statistics are a typical example for such files. Generation file sets provide access to a set of files used to store the actual data. At any time at most one element of the set is being written to. The type given specifies when and how data will be directed to a new element of the set. This way, information stored in elements of a file set that are currently unused are available for administrational operations without the risk of disturbing the operation of <tt>ntpd</tt>. (Most important: they can be removed to free space for new data produced.) 819c2daa00SOllivier Robert <dd>Note that this command can be sent from the <tt>ntpdc</tt> program running at a remote location. 829c2daa00SOllivier Robert <dl> 839c2daa00SOllivier Robert <dt><i><tt>name</tt></i> 849c2daa00SOllivier Robert <dd>This is the type of the statistics records, as shown in the <tt>statistics</tt> command. 859c2daa00SOllivier Robert </dl> 869c2daa00SOllivier Robert <dd><tt>file <i>filename</i></tt> 879c2daa00SOllivier Robert <dl> 889c2daa00SOllivier Robert <dd>This is the file name for the statistics records. Filenames of set members are built from three concatenated elements <i><tt>prefix</tt></i>, <i><tt>filename</tt></i> and <i><tt>suffix</tt></i>: 899c2daa00SOllivier Robert <dl> 909c2daa00SOllivier Robert <dt><i><tt>prefix</tt></i> 919c2daa00SOllivier Robert <dd>This is a constant filename path. It is not subject to modifications via the <tt>filegen</tt> option. It is defined by the server, usually specified as a compile-time constant. It may, however, be configurable for individual file generation sets via other commands. For example, the prefix used with <tt>loopstats</tt> and <tt>peerstats</tt> generation can be configured using the <tt>statsdir</tt> option explained above. 929c2daa00SOllivier Robert <dt><i><tt>filename</tt></i> 939c2daa00SOllivier Robert <dd>This string is directly concatenated to the prefix mentioned above (no intervening <tt>/</tt> (slash)). This can be modified using the <tt>file</tt> argument to the <tt>filegen</tt> statement. No <tt>..</tt> elements are allowed in this component to prevent filenames referring to parts outside the filesystem hierarchy denoted by <tt>prefix</tt>. 949c2daa00SOllivier Robert <dt><i><tt>suffix</tt></i> 959c2daa00SOllivier Robert <dd>This part is reflects individual elements of a file set. It is generated according to the type of a file set. 969c2daa00SOllivier Robert </dl> 979c2daa00SOllivier Robert </dl> 989c2daa00SOllivier Robert <dd><tt>type <i>typename</i></tt> 999c2daa00SOllivier Robert <dl> 1009c2daa00SOllivier Robert <dd>A file generation set is characterized by its type. The following types are supported: 1019c2daa00SOllivier Robert <dl> 1029c2daa00SOllivier Robert <dt><tt>none</tt> 1039c2daa00SOllivier Robert <dd>The file set is actually a single plain file. 1049c2daa00SOllivier Robert <dt><tt>pid</tt> 1059c2daa00SOllivier Robert <dd>One element of file set is used per incarnation of a <tt>ntpd</tt> server. This type does not perform any changes to file set members during runtime, however it provides an easy way of separating files belonging to different <tt>ntpd</tt> server incarnations. The set member filename is built by appending a <tt>.</tt> (dot) to concatenated <i>prefix</i> and <i>filename</i> strings, and appending the decimal representation of the process ID of the <tt>ntpd</tt> server process. 1069c2daa00SOllivier Robert <dt><tt>day</tt> 1079c2daa00SOllivier Robert <dd>One file generation set element is created per day. A day is defined as the period between 00:00 and 24:00 UTC. The file set member suffix consists of a <tt>.</tt> (dot) and a day specification in the form <tt>YYYYMMdd. YYYY</tt> is a 4-digit year number (e.g., 1992). <tt>MM</tt> is a two digit month number. <tt>dd</tt> is a two digit day number. Thus, all information written at 10 December 1992 would end up in a file named <tt><i>prefix filename</i>.19921210</tt>. 1089c2daa00SOllivier Robert <dt><tt>week</tt> 1099c2daa00SOllivier Robert <dd>Any file set member contains data related to a certain week of a year. The term week is defined by computing day-of-year modulo 7. Elements of such a file generation set are distinguished by appending the following suffix to the file set filename base: A dot, a 4-digit year number, the letter <tt>W</tt>, and a 2-digit week number. For example, information from January, 10th 1992 would end up in a file with suffix <tt>.1992W1</tt>. 1109c2daa00SOllivier Robert <dt><tt>month</tt> 1119c2daa00SOllivier Robert <dd>One generation file set element is generated per month. The file name suffix consists of a dot, a 4-digit year number, and a 2-digit month. 1129c2daa00SOllivier Robert <dt><tt>year</tt> 1139c2daa00SOllivier Robert <dd>One generation file element is generated per year. The filename suffix consists of a dot and a 4 digit year number. 1149c2daa00SOllivier Robert <dt><tt>age</tt> 1159c2daa00SOllivier Robert <dd>This type of file generation sets changes to a new element of the file set every 24 hours of server operation. The filename suffix consists of a dot, the letter <tt>a</tt>, and an 8-digit number. This number is taken to be the number of seconds the server is running at the start of the corresponding 24-hour period. Information is only written to a file generation by specifying <tt>enable</tt>; output is prevented by specifying <tt>disable</tt>. 1169c2daa00SOllivier Robert </dl> 1179c2daa00SOllivier Robert </dl> 1189c2daa00SOllivier Robert <dd><tt>link | nolink</tt> 1199c2daa00SOllivier Robert <dl> 1209c2daa00SOllivier Robert <dd>It is convenient to be able to access the current element of a file generation set by a fixed name. This feature is enabled by specifying <tt>link</tt> and disabled using <tt>nolink</tt>. If <tt>link</tt> is specified, a hard link from the current file set element to a file without suffix is created. When there is already a file with this name and the number of links of this file is one, it is renamed appending a dot, the letter <tt>C</tt>, and the pid of the <tt>ntpd</tt> server 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. 1219c2daa00SOllivier Robert </dl> 1229c2daa00SOllivier Robert <dd><tt>enable | disable</tt> 1239c2daa00SOllivier Robert <dl> 1249c2daa00SOllivier Robert <dd>Enables or disables the recording function. 1259c2daa00SOllivier Robert </dl> 1269c2daa00SOllivier Robert </dl> 1279c2daa00SOllivier Robert <hr> 1289c2daa00SOllivier Robert <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 129ea906c41SOllivier Robert </dl> 1309c2daa00SOllivier Robert </body> 1319c2daa00SOllivier Robert 1329c2daa00SOllivier Robert</html> 133