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