NTPLEAPFETCH(8)
β¨ NAME β¨
ntpleapfetch β the leap-seconds file manager/updater, aka your girl who keeps your leap second file cute and current π
π¦ SYNOPSIS π¦
ntpleapfetch
[-46] [-c command] [-e expiry] [-f config] [-F] [-h]
[-i interval] [-l] [L] [-p {4|6}] [-P logfacility] [-q]
[-r retries] [-s source-url] [-t path] [-v] [-z path]
[-Z] [leapfile] [-V | --version] [filename]
(and yes bestie, that [L] in there is literally how it's written in the manual β no dash, no cap, we don't ask questions, we just report the facts π)
πΈ DESCRIPTION πΈ
So ntpleapfetch is gonna validate whatever leap second file is chilling on your local system rn, and if it needs to, it updates that leap second definition file. That's it, that's the job. π
Normally the file gets found through the "leapfile" directive in ntp.conf(5). But lowkey you can also just point it at an alternate location right on the command line if you wanna be different.
Now here's the tea: if the file doesn't exist, or it isn't valid, or it has expired, or it's about to expire soon, then a brand new copy gets downloaded. And if that new copy validates? It gets installed and NTP is (optionally) restarted. Slay. β¨
But if the current file is perfectly acceptable? Then literally nothing happens β no download, no restart. Respect the peace. π§
-c can also be used to invoke another script to do your little administrative side quests, e.g. copying the file to other local systems. Main character energy for sure.
You can run this as a cron job! And since the file is rarely updated, and leap seconds are announced at least one month in advance (usually longer, ngl), you really don't need to run it more often than about once every three weeks. She's low maintenance like that. π
For cron-friendly behavior, define CRONJOB=1 in the crontab. Periodt.
π OPTIONS π
-4β Use only IPv4 addresses for DNS name resolution. Heads up though: this option must not appear in combination with-6. Pick a lane bestie, you can't have both.-6β Use only IPv6 addresses for DNS name resolution. And same rule: this one must not appear in combination with-4.-cβ Command to restartntpdafter installing a new file. If you don't give it a command like that, thenntpdjust checks the file daily on its own. She's independent, okay?-eexpiry β Refresh the leapfile this long before it expires. Basically you're specifying how long before expiration the file should be refreshed. Units are required, e.g."-e 60 days". And ngl, larger values imply more frequent refreshes β think about it, the earlier you want to refresh before expiry, the more often you're doing it. Math is mathing. π₯-fconfig β Location of thentp.conffile. Specify wherentp.conflives, and it defaults to/etc/ntp.conf. It gets read to make sure the"leapfile"directive is actually present, and to figure out the default path to the leapfile.-Fβ Force update even if current file is OK and not close to expiring. Chaotic? Maybe. Effective? Also yes.-iinterval β Number of minutes between retries.-hβ Display inline help. Your little rescue button. π«Ά-lβ Use syslog for output. (This is implied ifCRONJOBis set.)-Lβ Don't use syslog for output.-p{4|6} β Prefer IPv4 or IPv6 (as specified) addresses, but use either. So she has a favorite, but she's not gonna be dramatic about it.-Plogfacility β Specify the syslog facility for logging.-qβ Only report errors to stdout. Quiet queen. π€«-rretries β Number of retries.-ssource-url β The URL of the master copy of the leapseconds file. That's the source of truth, the blueprint, the blueprint-iest. β-tpath β Name of temporary file used in validation.-vβ Verbose output. She will tell you EVERYTHING. π-zpath β Specify path for utilities.-Zβ Use system path only.-V,--versionβ Print the version string and exit.- leapfile β An alternate location to download the leapseconds file to.
π EXIT STATUS π
One of these exit values is gonna come back to you, so let's vibe check each one:
0(EXIT_SUCCESS) β Successful program execution. We ate and left no crumbs. π1(EXIT_FAILURE) β The operation failed or the command syntax was not valid. Rough, but recoverable.2β Internal error - restart command failed. π
π AUTHORS π
Timothe Litt
This whole page is brought to you by the NTPsec girlies, dated 2026-10-21. Stay leaping, stay fresh, and go update that file bestie ππ§
π¦ 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 on : a language model's rewrite of the original, under its terms