-g, --panicgate
Allow the first adjustment to be Big. This option may appear
an unlimited number of times.
Normally, ntpd exits with a message to the system log if the
offset exceeds the panic threshold, which is 1000 s by default.
This option allows the time to be set to any value without re-
striction; however, this can happen only once. If the threshold
is exceeded after that, ntpd will exit with a message to the
system log. This option can be used with the -q and -x options.
See the tinker configuration file directive for other options.
ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high
# Set command_args based on the various config vars.
command_args="-p ${pidfile} -c ${ntpd_config} ${driftopt}"
if checkyesno ntpd_sync_on_start; then
command_args="${command_args} -g"
fi
ntpd_sync_on_start="YES"
in /etc/rc.conf.Instead of ntpdate(8), ntpd(8) can be used for one-shot sync, too.Please note that ntpdate(8) is deprecated and will get removed in some future FreeBSD version.
-g
is helpful and -q
is for one-shot sync (don't run as daemon and quit). For exmple: ntpd -q -g your-nearest-ntp-server
-4
(for IPv6-only network, -6
) would help, too.-q
cannot be used while ntpd(8) is running as daemon (service).Please note that ntpdate(8) is deprecated and will get removed in some future FreeBSD version.
I know, it's been mentioned in the man page for quite some time too, at least since 12.0 or maybe even longer.It has been more than 23 years since the word "retired" was written.
After a suitable period of mourning, the ntpdate utility is to be retired from this distribution.
If I recall correctly, some time providers in Japan already stopped providing ntpdate service. (Not 100% sure they actually stopped or just warned.)How long should this mourning period last
Well, if we haven't been able to sync time yet, does anyone really know how long it's been?How long should this mourning period lastCode:After a suitable period of mourning, the ntpdate utility is to be retired from this distribution.
It's not a special service? It just uses the NTP protocol as far as I know.If I recall correctly, some time providers in Japan already stopped providing ntpdate service. (Not 100% sure they actually stopped or just warned.)
ntpd -q -g pool.ntp.org
6 Jan 09:50:44 ntpd[1304]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): stat failed: No such file or directory
If I recall correctly, the reason of the announcement (sorry, lost track of it) was the differences of protocol version (ntpdate uses older and ntpd switched [supports] newer).It's not a special service? It just uses the NTP protocol as far as I know.
Ah. That makes sense. And having to maintain two tools doing more or less the same thing seems like a waste of time too.was the differences of protocol version (ntpdate uses older and ntpd switched [supports] newer).
/var/db/ntpd.leap-seconds.list only matters when arrived at leap seconds.Thanks for providing the replacment command.
ntpd -q -g pool.ntp.org
So unless I create this file getting slew lower won't matter on laptop reboot? It will go back to bad clock timing?
#### NTP ####
ntp_src_leapfile="/etc/ntp/leap-seconds"
ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
ntp_leapfile_sources="https://data.iana.org/timezones/data/leap-seconds.list"
ntp_leapfile_fetch_opts="-mq"
ntp_leapfile_expiry_days=30
ntp_leapfile_fetch_verbose="NO"
You'd better looking into /etc/defaults/rc.conf.So slew has nothing to do with leap seconds. My bad.
I just blindly scraped this from another thread and adjusted url to see what it does.
/etc/rc.conf
Code:#### NTP #### ntp_src_leapfile="/etc/ntp/leap-seconds" ntp_db_leapfile="/var/db/ntpd.leap-seconds.list" ntp_leapfile_sources="https://data.iana.org/timezones/data/leap-seconds.list" ntp_leapfile_fetch_opts="-mq" ntp_leapfile_expiry_days=30 ntp_leapfile_fetch_verbose="NO"
Thread 73624