xref: /aosp_15_r20/external/iputils/doc/clockdiff.sgml (revision bd1f8aeb6080fa6544ec30aeca3eb4da100f359f)
1*bd1f8aebSAndroid Build Coastguard Worker<refentry id="clockdiff">
2*bd1f8aebSAndroid Build Coastguard Worker
3*bd1f8aebSAndroid Build Coastguard Worker<refmeta>
4*bd1f8aebSAndroid Build Coastguard Worker<refentrytitle>clockdiff</refentrytitle>
5*bd1f8aebSAndroid Build Coastguard Worker<manvolnum>8</manvolnum>
6*bd1f8aebSAndroid Build Coastguard Worker<refmiscinfo>iputils-&snapshot;</refmiscinfo>
7*bd1f8aebSAndroid Build Coastguard Worker</refmeta>
8*bd1f8aebSAndroid Build Coastguard Worker
9*bd1f8aebSAndroid Build Coastguard Worker<refnamediv>
10*bd1f8aebSAndroid Build Coastguard Worker<refname>clockdiff</refname>
11*bd1f8aebSAndroid Build Coastguard Worker<refpurpose>measure clock difference between hosts</refpurpose>
12*bd1f8aebSAndroid Build Coastguard Worker</refnamediv>
13*bd1f8aebSAndroid Build Coastguard Worker
14*bd1f8aebSAndroid Build Coastguard Worker<refsynopsisdiv>
15*bd1f8aebSAndroid Build Coastguard Worker<cmdsynopsis>
16*bd1f8aebSAndroid Build Coastguard Worker<command>clockdiff</command>
17*bd1f8aebSAndroid Build Coastguard Worker<arg choice="opt"><option>-o</option></arg>
18*bd1f8aebSAndroid Build Coastguard Worker<arg choice="opt"><option>-o1</option></arg>
19*bd1f8aebSAndroid Build Coastguard Worker<arg choice="req"><replaceable/destination/</arg>
20*bd1f8aebSAndroid Build Coastguard Worker</cmdsynopsis>
21*bd1f8aebSAndroid Build Coastguard Worker</refsynopsisdiv>
22*bd1f8aebSAndroid Build Coastguard Worker
23*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>DESCRIPTION</title>
24*bd1f8aebSAndroid Build Coastguard Worker<para>
25*bd1f8aebSAndroid Build Coastguard Worker<command/clockdiff/ Measures clock difference between us and
26*bd1f8aebSAndroid Build Coastguard Worker<replaceable/destination/ with 1 msec resolution using ICMP TIMESTAMP
27*bd1f8aebSAndroid Build Coastguard Worker<link linkend="clockdiff.icmp-timestamp">[2]</link>
28*bd1f8aebSAndroid Build Coastguard Workerpackets or, optionally, IP TIMESTAMP option
29*bd1f8aebSAndroid Build Coastguard Worker<link linkend="clockdiff.ip-timestamp">[3]</link>
30*bd1f8aebSAndroid Build Coastguard Workeroption added to ICMP ECHO.
31*bd1f8aebSAndroid Build Coastguard Worker<link linkend="clockdiff.icmp-echo">[1]</link>
32*bd1f8aebSAndroid Build Coastguard Worker</para>
33*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
34*bd1f8aebSAndroid Build Coastguard Worker
35*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>OPTIONS</title>
36*bd1f8aebSAndroid Build Coastguard Worker
37*bd1f8aebSAndroid Build Coastguard Worker<variablelist>
38*bd1f8aebSAndroid Build Coastguard Worker
39*bd1f8aebSAndroid Build Coastguard Worker <varlistentry>
40*bd1f8aebSAndroid Build Coastguard Worker  <term><option/-o/</term>
41*bd1f8aebSAndroid Build Coastguard Worker  <listitem><para>
42*bd1f8aebSAndroid Build Coastguard WorkerUse IP TIMESTAMP with ICMP ECHO instead of ICMP TIMESTAMP
43*bd1f8aebSAndroid Build Coastguard Workermessages. It is useful with some destinations, which do not support
44*bd1f8aebSAndroid Build Coastguard WorkerICMP TIMESTAMP (f.e. Solaris &lt;2.4).
45*bd1f8aebSAndroid Build Coastguard Worker  </para></listitem>
46*bd1f8aebSAndroid Build Coastguard Worker </varlistentry>
47*bd1f8aebSAndroid Build Coastguard Worker
48*bd1f8aebSAndroid Build Coastguard Worker <varlistentry>
49*bd1f8aebSAndroid Build Coastguard Worker  <term><option/-o1/</term>
50*bd1f8aebSAndroid Build Coastguard Worker  <listitem><para>
51*bd1f8aebSAndroid Build Coastguard WorkerSlightly different form of <option/-o/, namely it uses three-term
52*bd1f8aebSAndroid Build Coastguard WorkerIP TIMESTAMP with prespecified hop addresses instead of four term one.
53*bd1f8aebSAndroid Build Coastguard WorkerWhat flavor works better depends on target host. Particularly,
54*bd1f8aebSAndroid Build Coastguard Worker<option/-o/ is better for Linux.
55*bd1f8aebSAndroid Build Coastguard Worker  </para></listitem>
56*bd1f8aebSAndroid Build Coastguard Worker </varlistentry>
57*bd1f8aebSAndroid Build Coastguard Worker
58*bd1f8aebSAndroid Build Coastguard Worker</variablelist>
59*bd1f8aebSAndroid Build Coastguard Worker
60*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
61*bd1f8aebSAndroid Build Coastguard Worker
62*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>WARNINGS</title>
63*bd1f8aebSAndroid Build Coastguard Worker<itemizedlist>
64*bd1f8aebSAndroid Build Coastguard Worker <listitem><para>
65*bd1f8aebSAndroid Build Coastguard WorkerSome nodes (Cisco) use non-standard timestamps, which is allowed
66*bd1f8aebSAndroid Build Coastguard Workerby RFC, but makes timestamps mostly useless.
67*bd1f8aebSAndroid Build Coastguard Worker </para></listitem>
68*bd1f8aebSAndroid Build Coastguard Worker <listitem><para>
69*bd1f8aebSAndroid Build Coastguard WorkerSome nodes generate messed timestamps (Solaris&gt;2.4), when
70*bd1f8aebSAndroid Build Coastguard Workerrun <command/xntpd/. Seems, its IP stack uses a corrupted clock source,
71*bd1f8aebSAndroid Build Coastguard Workerwhich is synchronized to time-of-day clock periodically and jumps
72*bd1f8aebSAndroid Build Coastguard Workerrandomly making timestamps mostly useless. Good news is that you can
73*bd1f8aebSAndroid Build Coastguard Workeruse NTP in this case, which is even better.
74*bd1f8aebSAndroid Build Coastguard Worker </para></listitem>
75*bd1f8aebSAndroid Build Coastguard Worker <listitem><para>
76*bd1f8aebSAndroid Build Coastguard Worker<command/clockdiff/ shows difference in time modulo 24 days.
77*bd1f8aebSAndroid Build Coastguard Worker </para></listitem>
78*bd1f8aebSAndroid Build Coastguard Worker</itemizedlist>
79*bd1f8aebSAndroid Build Coastguard Worker
80*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
81*bd1f8aebSAndroid Build Coastguard Worker
82*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>SEE ALSO</title>
83*bd1f8aebSAndroid Build Coastguard Worker<para>
84*bd1f8aebSAndroid Build Coastguard Worker<link linkend="ping">
85*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/ping/<manvolnum/8/</citerefentry></link>,
86*bd1f8aebSAndroid Build Coastguard Worker<link linkend="arping">
87*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/arping/<manvolnum/8/</citerefentry></link>,
88*bd1f8aebSAndroid Build Coastguard Worker<link linkend="tracepath">
89*bd1f8aebSAndroid Build Coastguard Worker<citerefentry><refentrytitle/tracepath/<manvolnum/8/</citerefentry></link>.
90*bd1f8aebSAndroid Build Coastguard Worker</para>
91*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
92*bd1f8aebSAndroid Build Coastguard Worker
93*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>REFERENCES</title>
94*bd1f8aebSAndroid Build Coastguard Worker<para>
95*bd1f8aebSAndroid Build Coastguard Worker[1] <anchor id="clockdiff.icmp-echo">ICMP ECHO,
96*bd1f8aebSAndroid Build Coastguard Worker<ulink url="http://tools.ietf.org/rfc/rfc792.txt">
97*bd1f8aebSAndroid Build Coastguard WorkerRFC0792, page 14</ulink>.
98*bd1f8aebSAndroid Build Coastguard Worker</para>
99*bd1f8aebSAndroid Build Coastguard Worker<para>
100*bd1f8aebSAndroid Build Coastguard Worker[2] <anchor id="clockdiff.icmp-timestamp">ICMP TIMESTAMP,
101*bd1f8aebSAndroid Build Coastguard Worker<ulink url="http://tools.ietf.org/rfc/rfc792.txt">
102*bd1f8aebSAndroid Build Coastguard WorkerRFC0792, page 16</ulink>.
103*bd1f8aebSAndroid Build Coastguard Worker</para>
104*bd1f8aebSAndroid Build Coastguard Worker<para>
105*bd1f8aebSAndroid Build Coastguard Worker[3] <anchor id="clockdiff.ip-timestamp">IP TIMESTAMP option,
106*bd1f8aebSAndroid Build Coastguard Worker<ulink url="http://tools.ietf.org/rfc/rfc791.txt">
107*bd1f8aebSAndroid Build Coastguard WorkerRFC0791, 3.1, page 16</ulink>.
108*bd1f8aebSAndroid Build Coastguard Worker</para>
109*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
110*bd1f8aebSAndroid Build Coastguard Worker
111*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>AUTHOR</title>
112*bd1f8aebSAndroid Build Coastguard Worker<para>
113*bd1f8aebSAndroid Build Coastguard Worker<command/clockdiff/ was compiled by
114*bd1f8aebSAndroid Build Coastguard Worker<ulink url="mailto:[email protected]">Alexey Kuznetsov
115*bd1f8aebSAndroid Build Coastguard Worker&lt;[email protected]&gt;</ulink>. It was based on code borrowed
116*bd1f8aebSAndroid Build Coastguard Workerfrom BSD <command/timed/ daemon.
117*bd1f8aebSAndroid Build Coastguard WorkerIt is now maintained by
118*bd1f8aebSAndroid Build Coastguard Worker<ulink url="mailto:[email protected]">YOSHIFUJI Hideaki
119*bd1f8aebSAndroid Build Coastguard Worker&lt;[email protected]&gt;</ulink>.
120*bd1f8aebSAndroid Build Coastguard Worker</para>
121*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
122*bd1f8aebSAndroid Build Coastguard Worker
123*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>SECURITY</title>
124*bd1f8aebSAndroid Build Coastguard Worker<para>
125*bd1f8aebSAndroid Build Coastguard Worker<command/clockdiff/ requires <constant/CAP_NET_RAW/ capability
126*bd1f8aebSAndroid Build Coastguard Workerto be executed. It is safe to be used as set-uid root.
127*bd1f8aebSAndroid Build Coastguard Worker</para>
128*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
129*bd1f8aebSAndroid Build Coastguard Worker
130*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>AVAILABILITY</title>
131*bd1f8aebSAndroid Build Coastguard Worker<para>
132*bd1f8aebSAndroid Build Coastguard Worker<command/clockdiff/ is part of <filename/iputils/ package
133*bd1f8aebSAndroid Build Coastguard Workerand the latest versions are  available in source form at
134*bd1f8aebSAndroid Build Coastguard Worker<ulink url="http://www.skbuff.net/iputils/iputils-current.tar.bz2">
135*bd1f8aebSAndroid Build Coastguard Workerhttp://www.skbuff.net/iputils/iputils-current.tar.bz2</ulink>.
136*bd1f8aebSAndroid Build Coastguard Worker</para>
137*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
138*bd1f8aebSAndroid Build Coastguard Worker
139*bd1f8aebSAndroid Build Coastguard Worker<![IGNORE[
140*bd1f8aebSAndroid Build Coastguard Worker<refsect1><title>COPYING</title>
141*bd1f8aebSAndroid Build Coastguard Worker<para>
142*bd1f8aebSAndroid Build Coastguard Worker<literallayout>
143*bd1f8aebSAndroid Build Coastguard WorkerThis documentation is free software; you can redistribute
144*bd1f8aebSAndroid Build Coastguard Workerit and/or modify it under the terms of the GNU General Public
145*bd1f8aebSAndroid Build Coastguard WorkerLicense Version 2.
146*bd1f8aebSAndroid Build Coastguard Worker
147*bd1f8aebSAndroid Build Coastguard WorkerThis program is distributed in the hope that it will be
148*bd1f8aebSAndroid Build Coastguard Workeruseful, but WITHOUT ANY WARRANTY; without even the implied
149*bd1f8aebSAndroid Build Coastguard Workerwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
150*bd1f8aebSAndroid Build Coastguard WorkerSee the GNU General Public License for more details.
151*bd1f8aebSAndroid Build Coastguard Worker
152*bd1f8aebSAndroid Build Coastguard WorkerFor more details see the file COPYING in the source
153*bd1f8aebSAndroid Build Coastguard Workerdistribution of Linux kernel of version 2.4.
154*bd1f8aebSAndroid Build Coastguard Worker</literallayout>
155*bd1f8aebSAndroid Build Coastguard Worker</para>
156*bd1f8aebSAndroid Build Coastguard Worker</refsect1>
157*bd1f8aebSAndroid Build Coastguard Worker]]>
158*bd1f8aebSAndroid Build Coastguard Worker
159*bd1f8aebSAndroid Build Coastguard Worker
160*bd1f8aebSAndroid Build Coastguard Worker
161*bd1f8aebSAndroid Build Coastguard Worker</refentry>
162