CLOCKDIFF(8)

  .SH "NAME" clockdiff - measure clock difference between hosts
  .SH "SYNOPSIS"
    .HP u
      clockdiff
       [-o]
       [-o1]
       [--time-format ctime iso]
       [-V]
       {destination}

  .SH "DESCRIPTION"

    .PP clockdiff Measures clock difference between us and destination with 1 msec resolution using ICMP TIMESTAMP [2] packets or, optionally, IP TIMESTAMP option [3] added to ICMP ECHO. [1]

  .SH "OPTIONS"

      .PP -o

              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).

          .RE
          .PP -o1

                  Slightly different form of -o, 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, -o is better for Linux.

              .RE
              .PP -T, --time-format ctime iso

                      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.

                  .RE
                  .PP -I

                          Alias of --time-format iso option and argument.

                      .RE
                      .PP -h, --help

                              Print help and exit.

                          .RE
                          .PP -V, --version

                                  Print version and exit.

                              .RE

                          .SH "WARNINGS"

                              .PP

                                      • Some nodes (Cisco) use non-standard timestamps, which is allowed by RFC, but makes timestamps mostly useless.

                                  .RE
                                  .PP

                                          • Some nodes generate messed timestamps (Solaris>2.4), when run xntpd. 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.

                                      .RE
                                      .PP

                                              • clockdiff shows difference in time modulo 24 days.

                                          .RE

                                      .SH "SEE ALSO"

                                        .PP ping(8), arping(8), tracepath(8).

                                      .SH "REFERENCES"

                                        .PP [1] ICMP ECHO, RFC0792, page 14.
                                        .PP [2] ICMP TIMESTAMP, RFC0792, page 16.
                                        .PP [3] IP TIMESTAMP option, RFC0791, 3.1, page 16.

                                      .SH "AUTHOR"

                                        .PP clockdiff was compiled by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>. It was based on code borrowed from BSD timed daemon.

                                      .SH "SECURITY"

                                        .PP clockdiff requires CAP_NET_RAW and CAP_SYS_NICE capabilities to be executed. It is safe to be used as set-uid root.

                                      .SH "AVAILABILITY"

                                        .PP clockdiff is part of iputils package.