NTPTRACE(1)
π ntptrace(1) β the NTPsec one, bestie
okay so picture this: you're in the terminal, you type man ntptrace, and boom β you're reading ntptrace(1) from the NTPsec gang. that's the manual page we're doing today and it's lowkey iconic. let's get into it π«Ά
β¨ NAME β¨
ntptrace β trace peers of an NTP server π
πΈ SYNOPSIS πΈ
ntptrace [-V | --version] [-n |--numeric]
[-m number | --max-hosts=number]
[-r host | --host=remote]
hostname
that's the whole vibe check right there. no cap β¨
π¦ DESCRIPTION π¦
okay so ntptrace is a python script, right? and what it does is it uses the ntpq utility program to follow the chain of NTP servers, starting from a host you give it, and walking all the way back to the primary time source. it's giving ancestry.com but for time servers π
here's the thing though β for ntptrace to actually work properly, every single one of those servers has to implement the NTP Control and Monitoring Protocol as specified in RFC 1305, and it has to enable NTP Mode 6 control packets. nowadays it's totally usual for public timeservers to disable Mode 6 queries, so ngl this script is unlikely to be very useful unless you've got a collection of specially-configured timeservers on your LAN. sad but true π
if you give it no arguments, ntptrace starts with localhost. here's what the output looks like, and yes it ate:
% 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 'GPS'
so on each line, the fields go left to right like this:
- the host name
- the host stratum
- the time offset between that host and the local host β and this is measured by
ntptraceitself, which is literally why it's 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. and just so we're clear on the lore: 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 β go read it if you want the full backstory π
π OPTIONS π
-n,--numericβ print IP addresses instead of hostnames. basically output hosts as dotted-quad numeric format rather than converting to the canonical host names. numbers only, no name-dropping π-m number,--max-hosts=numberβ maximum number of peers to trace. this option takes an integer number as its argument. the default number for this option is 99. ninety-nine peers, but a bug ain't one π₯-r string,--host=stringβ trace a single remote host. one host, one mission π―-V,--versionβ print the version string and exit. that's it, that's the whole job β¨
β EXIT STATUS β
one of the following exit values will be returned, and yes we're listing them all because we don't skip:
0(EXIT_SUCCESS) β successful program execution. slay π1(EXIT_FAILURE) β the operation failed or the invocation was not valid. it's giving flop, but respectfully π
π reminder bestie: Mode 6 queries are usually off on public timeservers, so don't come for ntptrace when it can't reach them. it's not her fault, fr fr.
and that's the page!! brought to you by NTPsec, dated 2026-10-21 β big thank you to the source and version for making this possible, mwah π«Άπ periodt.
π¦ where this page comes from
- fedora 43: ntpsec 1.2.6-1.fc43 Β· NTP AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC AND Apache-2.0 AND Beerware
- fedora 43: ntpsec 1.2.6-1.fc43 Β· NTP AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC AND Apache-2.0 AND Beerware
- fedora 44: ntpsec 1.2.6-1.fc44 Β· NTP AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC AND Apache-2.0 AND Beerware
- fedora 44: ntpsec 1.2.6-1.fc44 Β· NTP AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC AND Apache-2.0 AND Beerware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms