summaryrefslogtreecommitdiff
path: root/ntpmon.xml
blob: 45be8b926c2740de9a3d31ef12033e990689f9a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This file is Copyright (c) 2010 by the GPSD project
BSD terms apply: see the file COPYING in the distribution root for details.
-->
<!DOCTYPE refentry PUBLIC
   "-//OASIS//DTD DocBook XML V4.1.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id='ntpmon.1'>
<refentryinfo><date>25 Jan 2015</date></refentryinfo>
<refmeta>
<refentrytitle>ntpmon</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source">The GPSD Project</refmiscinfo>
<refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>ntpmon</refname>
<refpurpose>capture samples from GPS or other ntpd refclock sources</refpurpose>
</refnamediv>
<refsynopsisdiv id='synopsis'>

<cmdsynopsis>
  <command>ntpmon</command>
      <arg choice='opt'>-h </arg>
      <arg choice='opt'>-s </arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1 id='description'><title>DESCRIPTION</title>

<para>This program monitors the shared-memory segments updated by 
<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
(and possibly other refclock sources) as a way of communicating with
ntpd, the Network Time Protocol daemon. It reads these in exactly the way an
ntpd instance does. It can be run concurrently with ntpd without
interfering with ntpd's normal operation.</para>

<para>This program runs forever or until interrupted, generating
sample reports to standard output.  Each line consists of
whitespace-separated textual fields.</para>

<para>Here is an example of the beginning of a report file:

<literallayout>
ntpmon version 1
%
sample NTP2 1424865634 779678109 1424865634 109814469 1424865634 0 0 -1
sample NTP3 1424865634 779693823 1424865633 999315444 1424865634 0 0 -20
%
sample NTP2 1424865635 779902553 1424865635 113981778 1424865635 0 0 -1
sample NTP3 1424865635 779916521 1424865634 999344705 1424865635 0 0 -20
%
</literallayout></para>

<para>The output always begins with a header line expressing the
version of the output format; the version line begins with "ntpmon
version" and is followed by a numeric version field.</para>

<para>The remainder of the file is sample lines. The fields of a
sample line are as follows:

<orderedlist>
<listitem><para>The keyword "sample"</para></listitem>

<listitem><para>The NTP unit from which it was collected.</para></listitem>

<listitem><para>Collection time of day, seconds.</para></listitem>

<listitem><para>Collection time of day, nanoseconds.</para></listitem>

<listitem><para>Receiver time of day, seconds.</para></listitem>

<listitem><para>Receiver time of day, nanoseconds.</para></listitem>

<listitem><para>Clock time of day, seconds.</para></listitem>

<listitem><para>Clock time of day, nanoseconds</para></listitem>

<listitem><para>Leap-second offset.</para></listitem>

<listitem><para>Source precision.</para></listitem>
</orderedlist>
</para>

<para>In these fields, "clock time" is the high-precision time
measured by the source and "receiver time" is Unix UTC time at the
receiver. It is normal for the seconds part of receiver time to
coincide with the seconds part ofcollection time and for the
nanoseconds part of receiver time to be zero.</para>

<variablelist>
<varlistentry>
<term>-n</term>
<listitem>
<para>Argument specified the number of NTP units (segments) to query.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-s</term>
<listitem>
<para>Remove all segments specified by the units argument. This
option will normally only be of interest to GPSD developers.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>-h</term>
<listitem>
<para>Display program usage and exit.</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>
<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gpsdctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>libgpsd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
</refsect1>

<refsect1 id='maintainer'><title>AUTHOR</title>

<para>Eric S. Raymond <email>esr@thyrsus.com</email>.</para>
</refsect1>
</refentry>