NTPTIME(8)

πŸ’… NTPTIME(8) β€” the ntptime girlie's guide πŸ’…

ok so this is ntptime, bestie β€” it lives in the NTPsec manual, section 8 (that's the sysadmin section, very main character of it). Let me tell you everything about it, no gatekeeping, periodt. πŸŽ€


✨ NAME ✨

ntptime β€” read and set kernel time variables. that's it, that's the whole job. iconic behaviour honestly. πŸ•


🌸 SYNOPSIS 🌸

ntptime [-chr] [-e est_error] [-f frequency] [-j]
        [-m max_error] [-o offset] [-s status]
        [-t time_constant]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so first thing it does: it checks your kernel configuration for the NTP user interface syscalls ntp_gettime() and ntp_adjtime(). like a vibe check on your kernel, fr fr.

  • if those syscalls are present β†’ it displays the current timekeeping data. slay. πŸ’–
  • if they're not β†’ it displays a disappointment. yes, literally a disappointment, that's the word the page uses, and honestly? relatable. 😭
heads up bestie: for further details, go look at the kernel page file in the HTML documentation in the distribution. it's all in there, iykyk.

you can get a similar display with the ntpq program and its kerninfo command, so if you're already hanging out in ntpq, you're covered. 🫢

ngl this program is useful only with kernels featuring the ntp_adjtime(2) system call or a local equivalent, as described in the "A <kern.html> Kernel Model for Precision Timekeeping" page. (yes, that's the title with the stray quote marks and the angle brackets, i'm not touching it, it's part of the lore. πŸ’€) so if your kernel doesn't have that, this whole thing is giving nothing. check first!


πŸ‘‘ OPTIONS πŸ‘‘

  • -c β€” display the execution time of ntptime itself. meta! it's timing the timer. πŸ”₯
  • -e est_error β€” specify the estimated error, in microseconds.
  • -f frequency β€” specify the frequency offset, in parts per million.
  • -h β€” display help information. your lil rescue button. 🫢
  • -j β€” report in JSON rather than plain text. for the script girlies. ✨
  • -m max_error β€” specify the max possible errors, in microseconds.
  • -o offset β€” specify the clock offset, in microseconds.
  • -r β€” display Unix and NTP times in raw format. no filter, no makeup. πŸ’…
  • -s status β€” specify the clock status. the page's exact words: "Better know what you are doing." and like… it means it. please know what you're doing. πŸ™ˆ
  • -t time_constant β€” specify the time constant, an integer in the range 0-10. that's the range, don't push it.
  • -V β€” print the version string and exit. quick lil flex and dip. πŸ‘‘

πŸ’€ BUGS πŸ’€

the format for modes and status in the JSON report is less than ideal. that's the official tea. πŸ“

so if you're parsing the JSON in a script and the modes/status fields look cursed β€” they are, it's a known thing, you're not crazy. 😭

🌈 EXIT STATUS 🌈

one of these bad boys gets returned:

  1. 0 (EXIT_SUCCESS) β€” successful program execution. we love a win. πŸ’–
  2. 1 (EXIT_FAILURE) β€” the operation failed, or the command invocation was not valid. it's giving error era. 😭

🧚 SEE ALSO 🧚

ok technically there's no separate SEE ALSO section on this page, but the description does point you at these, so:

  • the kernel page file in the HTML documentation in the distribution (further details, go read it) πŸ“–
  • ntpq and its kerninfo command β€” gets you a similar display ✨
  • the ntp_adjtime(2) system call or local equivalent, and the "A <kern.html> Kernel Model for Precision Timekeeping" page πŸ•°οΈ

that's the whole page, bestie, no crumbs left. bye pookie, go read your kernel timekeeping data responsibly πŸ’œπŸŒŸ

NTPsec Β· 2026-10-21 Β· mwah, that's the version and date at the bottom, signing off πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from