ntptrace Command

Purpose

Traces a chain of Network Time Protocol (NTP) hosts back to their master time source.

Syntax

ntptrace [ -d ] [ -n ] [ -v ] [ -r Retries ] [ -t TimeOut ] [ Server ]

Description

The ntptrace command determines where a given NTP server gets its time, and follows the chain of NTP servers back to their master time source. For example, stratum 0 server.

Flags

Item Description
-d Turns on debugging output.
-n Outputs host IP addresses instead of host names.
-r Retries Specifies the number of retransmission attempts for each host. The default is 5.
-t TimeOut Specifies the retransmission timeout in seconds. The default is 2 seconds.
-v Specifies verbose mode.

Parameters

Item Description
Server Specifies the server. The default is the local host.

Exit Status

This command returns the following exit values:

Item Description
0 Successful completion.
>0 An error occurred.

Security

Access Control: You must be part of the system group to run this command.

Auditing Events: N/A

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

To trace where the local host NTP server gets its time from, enter:

ntptrace

Output similar to the following appears:

localhost: stratum 4, offset 0.0019529, synch distance 0.144135
server2.bozo.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:

  1. the host's stratum,
  2. the time offset between that host and the local host, as measured by the ntptrace command, (this is why it is not always zero for localhost).
  3. the host's synchronization distance, which is a measure of the quality of the clock's time, and
  4. the reference clock ID This only applies to stratum-1 servers.

All times are given in seconds.

Files

Item Description
/usr/sbin/ntptrace Contains the ntptrace command.