NTP Operational Commands
OSPF Show Commands
NTP Status
Displays the NTP status information.
Syntax:
show ntp status
supervisor@rtbrick>LEAF01: cfg> show ntp status
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.8p12@1.3728-o (1)", processor="x86_64",
system="Linux/5.4.40-OpenNetworkLinux", leap=0, stratum=3,
precision=-23, rootdelay=8.000, rootdisp=22.954, refid=198.51.100.13,
reftime=0xebe02d40.3a7421ac 2025-05-27T12:23:28.228334+00:00,
clock=0xebe03159.0c75c3b2 2025-05-27T12:40:57.048671+00:00,peer=60555,
tc=9, mintc=3, offset=-0.167277, frequency=-8.965, sys_jitter=0.076656,
clk_jitter=0.105, clk_wander=0.019
NTP Peer
Displays history of the NTP peers, showing when they went up or down and any changes in their status, identified by the peer’s IP address.
Syntax:
show ntp peer <options>
Option | Description |
---|---|
<peer-ip> |
IP address of the NTP peer to show history for. |
history |
Displays history of the NTP peers, showing when they went up or down and any changes in their status, identified by the peer’s IP address. |
detail |
Displays detailed information for a specific NTP peer, including its association ID, status, source address, port, hostname, destination address, leap indicator, stratum, precision, root delay, root dispersion, reference ID, reference time, receive time, reachability, host mode, peer mode, poll intervals, headway, key ID, offset, delay, dispersion, and jitter. |
<peer-ip> history |
Displays the history of a specific NTP peer. |
<peer-ip> detail |
Displays detailed information for a specific NTP peer. |
The example below shows the history of a specific NTP peer, showing when it went up or down and any changes in its status.
supervisor@rtbrick>LEAF01: cfg> show ntp peer 198.51.100.13 history
srcadr timestamp associd status reason
198.51.100.13 Tue May 27 10:15:27 GMT +0000 2025 60555 1414 Peer Up
198.51.100.13 Tue May 27 12:24:52 GMT +0000 2025 60555 161a Selected as Best
The example below shows detailed information of the NTP peers using NTP Mode 6 control message READVAR, including their association ID, status, source address, port, hostname, destination address, leap indicator, stratum, precision, root delay, root dispersion, reference ID, reference time, receive time, reachability, host mode, peer mode, poll intervals, headway, key ID, offset, delay, dispersion, and jitter.
supervisor@rtbrick>LEAF01: cfg> show ntp peer detail
associd: 60555, status: 161a
srcadr: 198.51.100.13, srcport: 123
srchost: node-2.infogral.is
dstadr: 198.51.100.101, Port: 123
leap: 0 leap_none, stratum: 2, precision: -25
rootdelay: 5.112
rootdisp: 0.290
refid: 192.0.2.4
reftime: 2025-05-27T12:34:07.000003+0000
rec: 2025-05-27T12:36:32.000003+0000
reach: 336, unreach: 2
hmode: 3 pmode: 4, hpoll: 9, ppoll: 9
headway: 0, keyid: 0
flash: 0 Ok
offset: -0.198
delay: 2.828
dispersion: 16.124001
jitter: 0.638
xleave: 0.036000
<...>
NTP Associations
Displays the information about the various NTP servers configured.
Syntax:
show ntp association <options>
Option | Description |
---|---|
no-resolve |
Details without DNS resolution. |
supervisor@rtbrick.net: op> show ntp association
Flags: * Synchronized, # Almost synchronized, + Selected for possible synchronization,"
– Candidate for selection, ~ Statically configured"
Remote Refid St T When Poll Reach Delay Offset Jitter
+194.50.19.117 131.188.3.222 2 u 522 1024 377 4.939 0.162 0.069
*193.203.3.171 .GPS. 1 u 897 1024 377 9.791 0.008 0.066
-51.75.67.47 157.13.205.54 3 u 770 1024 377 4.929 -0.110 0.149
+85.215.189.120 192.53.103.103 2 u 868 1024 377 13.483 0.043 0.181
-167.235.70.245 195.176.26.205 2 u 757 1024 377 0.883 0.158 0.332
-162.159.200.123 10.163.8.4 3 u 642 1024 377 4.160 0.439 0.484
Verifying NTP Service on Linux
To get more information about NTP’s status, use the ntpq
command:
The command displays the NTP servers that the system is synchronized with.
supervisor@rtbrick>LEAF01:~ $ sudo ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
198.51.100.5 .XFAC. 16 u - 64 0 0.000 0.000 0.000