Ntptrace User's Manual


Next: , Previous: (dir), Up: (dir)

Simple Network Time Protocol User Manual

This document describes the use of the NTP Project's ntptrace program. This document applies to version 4.2.8p3 of ntptrace.

Short Contents


Previous: ntptrace Description, Up: Top

Invoking ntptrace

ntptrace is a perl script that uses the ntpq utility program to follow the chain of NTP servers from a given host back to the primary time source. For ntptrace to work properly, each of these servers must implement the NTP Control and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets.

If given no arguments, ntptrace starts with localhost. Here is an example of the output from ntptrace:

     % ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135
     server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu:
     stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'

On each line, the fields are (left to right): the host name, the host stratum, the time offset between that host and the local host (as measured by ntptrace; this is why it is not always zero for "localhost"), the host synchronization distance, and (only for stratum-1 servers) the reference clock ID. All times are given in seconds. Note that the stratum is the server hop count to the primary source, while the synchronization distance is the estimated error relative to the primary source. These terms are precisely defined in RFC-1305.

This section was generated by AutoGen, using the agtexi-cmd template and the option descriptions for the ntptrace program.


Next: , Up: ntptrace Invocation

ntptrace help/usage (--help)

This is the automatically generated usage text for ntptrace.

The text printed is the same whether selected with the help option (--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is used to select the program, defaulting to more. Both will exit with a status code of 0.

ntptrace - Trace peers of an NTP server - Ver. 4.2.8p3
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]

    -n, --numeric                Print IP addresses instead of hostnames
    -m, --max-hosts=num          Maximum number of peers to trace
    -r, --host=str               Single remote host
    -?, --help                   Display usage information and exit
        --more-help              Pass the extended usage text through a pager

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.


Next: , Previous: ntptrace usage, Up: ntptrace Invocation

numeric option (-n)

This is the “print ip addresses instead of hostnames” option. Output hosts as dotted-quad numeric format rather than converting to the canonical host names.


Next: , Previous: ntptrace numeric, Up: ntptrace Invocation

max-hosts option (-m)

This is the “maximum number of peers to trace” option. This option takes a number argument. This option has no doc documentation.


Next: , Previous: ntptrace max-hosts, Up: ntptrace Invocation

host option (-r)

This is the “single remote host” option. This option takes a string argument. This option has no doc documentation.


Previous: ntptrace host, Up: ntptrace Invocation

ntptrace exit status

One of the following exit values will be returned:

0 (EXIT_SUCCESS)
Successful program execution.
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.