| 1 | <refentry xmlns="http://docbook.org/ns/docbook" version="5.0" |
| 2 | xml:id="man.clockdiff"> |
| 3 | |
| 4 | <refentryinfo> |
| 5 | <title>clockdiff</title> |
| 6 | <productname>iputils</productname> |
| 7 | </refentryinfo> |
| 8 | |
| 9 | <refmeta> |
| 10 | <refentrytitle> |
| 11 | <application>clockdiff</application> |
| 12 | </refentrytitle> |
| 13 | <manvolnum>8</manvolnum> |
| 14 | <refmiscinfo class='manual'>iputils</refmiscinfo> |
| 15 | </refmeta> |
| 16 | |
| 17 | <refnamediv> |
| 18 | <refname>clockdiff</refname> |
| 19 | <refpurpose>measure clock difference between hosts</refpurpose> |
| 20 | </refnamediv> |
| 21 | |
| 22 | <refsynopsisdiv> |
| 23 | <cmdsynopsis sepchar=" "> |
| 24 | <command>clockdiff</command> |
| 25 | <arg choice="opt" rep="norepeat"> |
| 26 | <option>-o</option> |
| 27 | </arg> |
| 28 | <arg choice="opt" rep="norepeat"> |
| 29 | <option>-o1</option> |
| 30 | </arg> |
| 31 | <arg choice="opt" rep="norepeat"> |
| 32 | <option>--time-format |
| 33 | <replaceable>ctime iso</replaceable></option> |
| 34 | </arg> |
| 35 | <arg choice="opt" rep="norepeat"> |
| 36 | <option>-V</option> |
| 37 | </arg> |
| 38 | <arg choice="req" rep="norepeat">destination</arg> |
| 39 | </cmdsynopsis> |
| 40 | </refsynopsisdiv> |
| 41 | |
| 42 | <refsection xml:id="description"> |
| 43 | <info> |
| 44 | <title>DESCRIPTION</title> |
| 45 | </info> |
| 46 | <para> |
| 47 | <command>clockdiff</command> Measures clock difference between |
| 48 | us and |
| 49 | <emphasis remap="I">destination</emphasis> with 1 msec |
| 50 | resolution using ICMP TIMESTAMP [2] packets or, optionally, IP |
| 51 | TIMESTAMP option [3] added to ICMP ECHO. [1]</para> |
| 52 | </refsection> |
| 53 | |
| 54 | <refsection xml:id="options"> |
| 55 | <info> |
| 56 | <title>OPTIONS</title> |
| 57 | </info> |
| 58 | <variablelist remap='TP'> |
| 59 | <varlistentry> |
| 60 | <term> |
| 61 | <option>-o</option> |
| 62 | </term> |
| 63 | <listitem> |
| 64 | <para>Use IP TIMESTAMP with ICMP ECHO instead of ICMP |
| 65 | TIMESTAMP messages. It is useful with some destinations, |
| 66 | which do not support ICMP TIMESTAMP (f.e. Solaris |
| 67 | <2.4).</para> |
| 68 | </listitem> |
| 69 | </varlistentry> |
| 70 | <varlistentry> |
| 71 | <term> |
| 72 | <option>-o1</option> |
| 73 | </term> |
| 74 | <listitem> |
| 75 | <para>Slightly different form of |
| 76 | <option>-o</option>, namely it uses three-term IP |
| 77 | TIMESTAMP with prespecified hop addresses instead of four |
| 78 | term one. What flavor works better depends on target |
| 79 | host. Particularly, |
| 80 | <option>-o</option> is better for Linux.</para> |
| 81 | </listitem> |
| 82 | </varlistentry> |
| 83 | <varlistentry> |
| 84 | <term> |
| 85 | <option>-T</option> |
| 86 | </term> |
| 87 | <term> |
| 88 | <option>--time-format <replaceable>ctime iso</replaceable></option> |
| 89 | </term> |
| 90 | <listitem> |
| 91 | <para>Print time stamp in output either ISO-8601 format or |
| 92 | classical ctime format. The ctime format is default. The ISO |
| 93 | time stamp includes timezone, and is easier to parse.</para> |
| 94 | </listitem> |
| 95 | </varlistentry> |
| 96 | <varlistentry> |
| 97 | <term> |
| 98 | <option>-I</option> |
| 99 | </term> |
| 100 | <listitem> |
| 101 | <para>Alias of <option>--time-format <replaceable>iso</replaceable> |
| 102 | </option> option and argument.</para> |
| 103 | </listitem> |
| 104 | </varlistentry> |
| 105 | <varlistentry> |
| 106 | <term> |
| 107 | <option>-h</option> |
| 108 | </term> |
| 109 | <term> |
| 110 | <option>--help</option> |
| 111 | </term> |
| 112 | <listitem> |
| 113 | <para>Print help and exit.</para> |
| 114 | </listitem> |
| 115 | </varlistentry> |
| 116 | <varlistentry> |
| 117 | <term> |
| 118 | <option>-V</option> |
| 119 | </term> |
| 120 | <term> |
| 121 | <option>--version</option> |
| 122 | </term> |
| 123 | <listitem> |
| 124 | <para>Print version and exit.</para> |
| 125 | </listitem> |
| 126 | </varlistentry> |
| 127 | </variablelist> |
| 128 | </refsection> |
| 129 | |
| 130 | <refsection xml:id="warnings"> |
| 131 | <info> |
| 132 | <title>WARNINGS</title> |
| 133 | </info> |
| 134 | <variablelist remap="TP"> |
| 135 | <varlistentry> |
| 136 | <listitem> |
| 137 | <para>• Some nodes (Cisco) use non-standard timestamps, |
| 138 | which is allowed by RFC, but makes timestamps mostly |
| 139 | useless.</para> |
| 140 | </listitem> |
| 141 | </varlistentry> |
| 142 | <varlistentry> |
| 143 | <listitem> |
| 144 | <para>• Some nodes generate messed timestamps |
| 145 | (Solaris>2.4), when run |
| 146 | <command>xntpd</command>. Seems, its IP stack uses a |
| 147 | corrupted clock source, which is synchronized to |
| 148 | time-of-day clock periodically and jumps randomly making |
| 149 | timestamps mostly useless. Good news is that you can use |
| 150 | NTP in this case, which is even better.</para> |
| 151 | </listitem> |
| 152 | </varlistentry> |
| 153 | <varlistentry> |
| 154 | <listitem> |
| 155 | <para>• |
| 156 | <command>clockdiff</command> shows difference in time |
| 157 | modulo 24 days.</para> |
| 158 | </listitem> |
| 159 | </varlistentry> |
| 160 | </variablelist> |
| 161 | </refsection> |
| 162 | |
| 163 | <refsect1 id='see_also'> |
| 164 | <title>SEE ALSO</title> |
| 165 | <para> |
| 166 | <citerefentry> |
| 167 | <refentrytitle>ping</refentrytitle> |
| 168 | <manvolnum>8</manvolnum> |
| 169 | </citerefentry>, |
| 170 | <citerefentry> |
| 171 | <refentrytitle>arping</refentrytitle> |
| 172 | <manvolnum>8</manvolnum> |
| 173 | </citerefentry>, |
| 174 | <citerefentry> |
| 175 | <refentrytitle>tracepath</refentrytitle> |
| 176 | <manvolnum>8</manvolnum> |
| 177 | </citerefentry>.</para> |
| 178 | </refsect1> |
| 179 | |
| 180 | <refsection xml:id="references"> |
| 181 | <info> |
| 182 | <title>REFERENCES</title> |
| 183 | </info> |
| 184 | <para>[1] ICMP ECHO, RFC0792, page 14.</para> |
| 185 | <para>[2] ICMP TIMESTAMP, RFC0792, page 16.</para> |
| 186 | <para>[3] IP TIMESTAMP option, RFC0791, 3.1, page 16.</para> |
| 187 | </refsection> |
| 188 | |
| 189 | <refsect1 id='author'> |
| 190 | <title>AUTHOR</title> |
| 191 | <para> |
| 192 | <command>clockdiff</command> was compiled by Alexey Kuznetsov |
| 193 | <[email protected]>. It was based on code borrowed |
| 194 | from BSD |
| 195 | <command>timed</command> daemon.</para> |
| 196 | </refsect1> |
| 197 | |
| 198 | <refsect1 id='security'> |
| 199 | <title>SECURITY</title> |
| 200 | <para> |
| 201 | <command>clockdiff</command> requires CAP_NET_RAW and |
| 202 | CAP_SYS_NICE capabilities to be executed. It is safe |
| 203 | to be used as set-uid root.</para> |
| 204 | </refsect1> |
| 205 | |
| 206 | <refsect1 id='availability'> |
| 207 | <title>AVAILABILITY</title> |
| 208 | <para> |
| 209 | <command>clockdiff</command> is part of |
| 210 | <emphasis remap='I'>iputils</emphasis> package.</para> |
| 211 | </refsect1> |
| 212 | </refentry> |