Debian Codegraph @

upstream/mageia-cauldron/man8/clockdiff.8

raw
1 '\" t
2 .TH "CLOCKDIFF" "8" "" "iputils 20250605" "iputils"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 clockdiff \- measure clock difference between hosts
24 .SH "SYNOPSIS"
25 .HP \w'\fBclockdiff\fR\ 'u
26 \fBclockdiff\fR [\fB\-o\fR] [\fB\-o1\fR] [\fB\-\-time\-format\ \fR\fB\fIctime\ iso\fR\fR] [\fB\-V\fR] {destination}
27 .SH "DESCRIPTION"
28 .PP
29 \fBclockdiff\fR
30 Measures clock difference between us and
31 \fIdestination\fR
32 with 1 msec resolution using ICMP TIMESTAMP [2] packets or, optionally, IP TIMESTAMP option [3] added to ICMP ECHO\&. [1]
33 .SH "OPTIONS"
34 .PP
35 \fB\-o\fR
36 .RS 4
37 Use IP TIMESTAMP with ICMP ECHO instead of ICMP TIMESTAMP messages\&. It is useful with some destinations, which do not support ICMP TIMESTAMP (f\&.e\&. Solaris <2\&.4)\&.
38 .RE
39 .PP
40 \fB\-o1\fR
41 .RS 4
42 Slightly different form of
43 \fB\-o\fR, namely it uses three\-term IP TIMESTAMP with prespecified hop addresses instead of four term one\&. What flavor works better depends on target host\&. Particularly,
44 \fB\-o\fR
45 is better for Linux\&.
46 .RE
47 .PP
48 \fB\-T\fR, \fB\-\-time\-format \fR\fB\fIctime iso\fR\fR
49 .RS 4
50 Print time stamp in output either ISO\-8601 format or classical ctime format\&. The ctime format is default\&. The ISO time stamp includes timezone, and is easier to parse\&.
51 .RE
52 .PP
53 \fB\-I\fR
54 .RS 4
55 Alias of
56 \fB\-\-time\-format \fR\fB\fIiso\fR\fR\fB \fR
57 option and argument\&.
58 .RE
59 .PP
60 \fB\-h\fR, \fB\-\-help\fR
61 .RS 4
62 Print help and exit\&.
63 .RE
64 .PP
65 \fB\-V\fR, \fB\-\-version\fR
66 .RS 4
67 Print version and exit\&.
68 .RE
69 .SH "WARNINGS"
70 .PP
71 .RS 4
72 \(bu Some nodes (Cisco) use non\-standard timestamps, which is allowed by RFC, but makes timestamps mostly useless\&.
73 .RE
74 .PP
75 .RS 4
76 \(bu Some nodes generate messed timestamps (Solaris>2\&.4), when run
77 \fBxntpd\fR\&. Seems, its IP stack uses a corrupted clock source, which is synchronized to time\-of\-day clock periodically and jumps randomly making timestamps mostly useless\&. Good news is that you can use NTP in this case, which is even better\&.
78 .RE
79 .PP
80 .RS 4
81 \(bu
82 \fBclockdiff\fR
83 shows difference in time modulo 24 days\&.
84 .RE
85 .SH "SEE ALSO"
86 .PP
87 \fBping\fR(8),
88 \fBarping\fR(8),
89 \fBtracepath\fR(8)\&.
90 .SH "REFERENCES"
91 .PP
92 [1] ICMP ECHO, RFC0792, page 14\&.
93 .PP
94 [2] ICMP TIMESTAMP, RFC0792, page 16\&.
95 .PP
96 [3] IP TIMESTAMP option, RFC0791, 3\&.1, page 16\&.
97 .SH "AUTHOR"
98 .PP
99 \fBclockdiff\fR
100 was compiled by Alexey Kuznetsov <kuznet@ms2\&.inr\&.ac\&.ru>\&. It was based on code borrowed from BSD
101 \fBtimed\fR
102 daemon\&.
103 .SH "SECURITY"
104 .PP
105 \fBclockdiff\fR
106 requires CAP_NET_RAW and CAP_SYS_NICE capabilities to be executed\&. It is safe to be used as set\-uid root\&.
107 .SH "AVAILABILITY"
108 .PP
109 \fBclockdiff\fR
110 is part of
111 \fIiputils\fR
112 package\&.