NTPSWEEP(1)

πŸ’– NAME πŸ’–

okay so bestie, meet ntpsweep(1) β€” the Unix tool that prints, per host, the NTP stratum level, the clock offset in seconds, the daemon version, the operating system, and the processor. It can also optionally recurse through all the peers. πŸ’…

If no hosts are specified, ntpsweep reports on localhost. periodt. ✨

✨ SYNOPSIS ✨

ntpsweep [-V | --version] [-l host]... [-p] [-m number] [-s prefix] [-h string] [hostfile...]

πŸ¦‹ DESCRIPTION πŸ¦‹

ntpsweep prints per host the NTP stratum level, the clock offset in seconds, the daemon version, the operating system, and the processor. Optionally, it recurses through all peers. 🫢

If no hosts are specified, ntpsweep reports on localhost. 🌸

Here’s the tea: ntpsweep relies on ntpq and Mode 6 queries to probe servers. That depends on the remote host’s restrict configuration allowing queries. Nowadays effectively all public hosts set noquery, so this script is unlikely to be useful unless you have multiple specially-configured timeservers on a LAN. 😭

⚠️ ngl, this is the part where the vibe check matters: if those remote hosts don’t allow queries via restrict, the sweep is gonna be a whole flop. πŸ’€

🌸 OPTIONS 🌸

  • -l string, --host-list=string β€” Host to execute actions on. This option may appear an unlimited number of times. Use this option to specify the host on which this script operates. May appear multiple times. Multiple hosts may be specified, delimited by commas. πŸ’–
  • -p, --peers β€” Recursively list all peers a host synchronizes to. πŸ¦‹
  • -m number, --maxlevel=number β€” Traverse peers up to this level (4 is a reasonable number). This option takes an integer number as its argument. πŸ”’
  • -s string, --strip=string β€” Strip this string from hostnames. βœ‚οΈ
  • -h string, --host=string β€” Specify a single host. Deprecated option for backwards compatibility. 🫢
  • -V, --version β€” Print the version string and exit. πŸ‘‘

If hostfiles are specified, they are treated as lists of hostnames to be swept, one per line. πŸ“

πŸŽ€ 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. πŸ’€

mwah πŸ’‹ this page is from NTPsec, dated 2026-10-21. now go sweep those timeservers, bestie β€” you got this! 🌈✨

πŸ“¦ where this page comes from