# Monitoring NTP

After you configure the system as an NTP client, you can use show commands to view information about the NTP servers you assigned and the status of NTP on the interface.

| Note: For about 30 minutes after you configure the system as an NTP client, the data varies rapidly, and then starts to stabilize. Wait at least 1 hour before using the data to make decisions about NTP servers.

Many of the fields in the displays of these show commands take their values from the NTP messages. The NTP client uses this data to compare the performance of its NTP servers and to choose a master.

show ntp associations

- Use to view the information about the NTP servers you assigned.
- Field descriptions
  - * (Master)—System is synchronizing to this server
  - # (Master - unsynchronized)—System has chosen this server as master, but the master has not yet synchronized to UTC
  - + (Selected)—System will consider this server when it chooses the master
  - - (Candidate)—System may consider this server when it chooses the master
  - x (Unusable)—Server does not meet the initial criteria for master
  - p (Preferred)—Server that you specified as the preferred server
  - ~ (Configured)—Server is a configured server; no tilde indicates a broadcast server
  - Peer Address—IP address of server
  - Stratum—Number of hops between the server and the accurate time source
  - Poll—Time between NTP requests from system to server
  - Reachable—8-bit number that shows whether or not the NTP server responded to the last eight requests from the system; one indicates a response, zero indicates no response. For example, 11111111 indicates that the NTP server responded to the last eight requests. If the system reaches one server less often than it does other servers, that server is not a good choice for the master.
  - Precision—Length of the clock tick (interrupt interval) of server’s clock
  - Delay—Round-trip delay, with the lowest dispersion value in the sample buffer, between the system and the server
  - Offset—Difference, with the lowest dispersion in the sample buffer, between the system’s clock and the server’s clock
  - Disp.—Lowest measure, in the sample buffer, of the error associated with the peer offset, based on the peer delay
- Example

      host1# show ntp associations
      Peer Address    Stratum  Poll  Reachable Precision  Delay   Offset  Disp.
      - 10.6.129.58     3      512s  01111111  0.000000s  0.000s  0.052s  0.010s
      +~152.2.21.1      2      256s  11111111  0.000015s  0.070s  0.039s  0.020s
      +~128.182.58.100  2      256s  11011111  0.000004s  0.030s  0.019s  0.074s
      *p128.118.25.3    2      256s  10111111  0.000015s  0.020s  0.038s  0.073s
        (* Master, + Selected, - Candidate, x Unusable) (p Preferred, ~ Configured)

- See show ntp associations.

show ntp associations

- Use to view the information about the NTP servers you assigned.
- Field descriptions
  - Peer—IP address of server, status of the server: configured, master, selected, candidate, correct, or unusable
    - configured—Confirmation that you assigned this NTP server to the system
    - master—System has chosen this server as the master
    - selected—System will consider this server when it chooses the master
    - candidate—System may consider this server when it chooses the master
    - correct—System considers the server’s clock to be reasonably correct
    - unusable—Server does not meet the initial criteria for the master
    - stratum—Number of hops between the server and its stratum 1 server
    - Peer is a Broadcast/Configured Server—Type of NTP server: one that broadcasts NTP messages or one you have configured for NTP services
    - version—Version of NTP on the server
    - polled every—Time between NTP requests from the system to the server
    - polls every—Time between NTP requests from the server to its NTP servers
    - Root Delay—Round-trip time between the server and its stratum 1 root server
    - Root Dispersion—Measure of all the errors associated with the network hops and servers between the server and its stratum 1 server
    - Sync Dist.—Measure of the total time error since the update in the path to the stratum 1 server
    - Peer Delay—Round-trip delay, with the lowest dispersion value in the sample buffer, between the system and the server
    - Peer Dispersion—Lowest measure, in the sample buffer, of the error associated with the peer offset, based on the peer delay and precision
    - Offset—Difference, with the lowest dispersion in the sample buffer, between the system’s clock and the server’s clock
    - Reachability—8-bit number that shows whether or not the NTP server responded to the last eight requests from the system; one indicates a response; zero indicates no response. For example, 11111111 indicates that the NTP server responded to the last eight requests. If the system reaches one server less often than it does other servers, that server is not a good choice for the master.
    - Precision—Length of the clock tick (interrupt interval) of the server’s clock
    - Source—IP address of the interface to which NTP servers should send NTP responses
  - Timestamps of latest time samples from this peer; actual timestamps displayed depends on how the server is configured
    - Root reference at—Last time at which the stratum 1 server sent an NTP reply to the server
    - Last request sent—Last time at which the system sent an NTP request to the server
    - Response/Broadcast was sent—Last time at which the server sent an NTP reply or broadcast to the system
    - Response/Broadcast received—Last time at which the system received an NTP reply or broadcast from this server
  - Sample buffer for this peer contains the following samples:
    - Delay—Round-trip delay from client to server
    - Offset—Difference between client’s and server’s clocks
    - Dispersion—Measure of the errors of the offset values, based on the round-trip delay and the precisions of the system and the server
- Example

      host1# show ntp associations detail
      Peer 10.6.129.58 is selected, stratum 3
         Peer is a Broadcast Server, version 3, broadcasts every 64 sec
         Root Delay 0.059052 sec, Dispersion 0.189056 sec, Sync Dist. 0.229679 sec
         Peer Delay -0.000016 sec, Dispersion 0.009665 sec, Offset 0.050714 sec
         Reachability 11111110, Precision 0.000000 sec
         'Source' Interface : default (transmit interface)
       Timestamps of latest time sample from this peer:
         Root reference  at:  Thu, Apr 13 2000 17:27:17.145 from 128.118.25.3
         Broadcast was sent:  Thu, Apr 13 2000 17:42:02.118
         Broadcast received:  Thu, Apr 13 2000 17:42:02.067
       Sample buffer for this peer contains the following samples:
         Delay    (sec):   0.000  0.000  0.000  0.000  0.000  0.000  0.000  0.000
         Offset   (sec):   0.049  0.050  0.050  0.050  0.050  0.050  0.051  0.051
         Dispersion(sec):  0.015  0.015  0.014  0.013  0.012  0.011  0.010  0.009

- See show ntp associations.

show ntp status

- Use to view the configuration and status of the system.
- Field descriptions
  - NTP Status—State of NTP on the system and the stratum number of the server
  - No. of associations—Number of peer associations for the NTP server
  - Clock Status:
    - Offset Error—Time difference between the system and the master, in seconds
    - Frequency Error—Error in the frequency of the system’s clock, in seconds per second
    - Last Update—Last time received from the master
    - Root Dispersion—Measure of all the errors associated with the network hops and servers between the system and its stratum 1 server, in seconds
  - Configuration:
    - Admin. State—Status of NTP on the router (enabled or disabled)
    - Virtual Router Name—Name of the virtual router to which you attached NTP
    - Broadcast Delay—Time for a broadcast message to travel between the server and the client, in microseconds
    - Client Mode—NTP client status (True – system is an NTP client; False – system is not an NTP client)
    - Master Mode—NTP server status (True – system is configured as an NTP server; False – system is not configured as an NTP server)
    - Stratum No.—Stratum number of system if configured as NTP server
    - Summer Time—Status of seasonal time, True or False
    - Summer Timezone Name—Name of summer time zone
    - Timezone Name—Name of time zone
    - Timezone Offset—Time difference between the time zone and UTC, in hours:minutes
    - Access List—Identities of access lists of servers from which the system does not accept broadcasts
    - ‘Server Source’ Interface—Interface through which responses from the NTP server are directed; configured through the ntp server source command, which overrides the interface configured through the ntp source command.
    - ‘Client Source’ Interface—Interface through which all NTP server responses are directed; configured through the ntp source command.
    - Source Interface—IP address of the interface to which NTP servers should send NTP responses
    - Address—IP address of interface
    - Enable—Status of NTP on the interface, On or Off
    - BcastClient—Indication of whether or not this interface accepts broadcasts from NTP servers, On or Off
    - BcastServer—Indication of whether or not this interface functions as a broadcast server, On or Off
    - Name—Type of interface and its location
- Example

      host1# show ntp status
      Network Time Protocol (NTP v.4)
       NTP Status                   :No valid NTP server available
         No. of associations        : 0
       Clock Status                 :Initializing: frequency to be calibrated
         Offset Error               : 0 sec, amortizing asymptotically
         Frequency Error            : 0 sec/sec, compensating every second
         Last Update                :
         Root Dispersion            : 0 sec
       Configuration:
         Admin. State               : NTP Enabled
         Virtual Router Name        : default
         Broadcast Delay            : 3000 microseconds
         Client Mode                : True
         Master Mode                : False
         Stratum No.                : Unspecified
         Summer Time                : False
         Summer Timezone Name       :
         Timezone Name              : UTC
         Timezone Offset            : 00:0  hours:minutes
         Access List                :
         'Server Source' Interface  :
         ‘Client Source’ Interface  : Default (transmit interface)
       Interface Configuration      :
         Address     Enable    BcastClient  BcastServer   Name
         1.1.1.1      ON          ON           ON        FastEthernet1/0

- See show ntp status.