ntp - BYO-NTP/recipes GitHub Wiki
Install
FreeBSD has included the reference ntp daemon and PPS kernel support since the FreeBSD 3 release in 1998. The installer merely configures it for you.
On Pi OS / Debian, installing ntp from packages will get you ntpsec. To run the canonical ntpd, it must be built from source. The install.sh script does this for you.
curl -sS https://byo-ntp.github.io/tools/ntp/install.sh | sh
source code, and discussion.
Verify
- Use ntpq commands
- printf '\e[8;9;80t'; ssh -t $NTP_HOST gnu-watch -n2 ntpq -c peer
- After an hour or three, measure the offset. Update the time2 offset.
- Use something like telegraf + influxdb + grafana for statistics.
Disable
Programatically:
curl -sS https://byo-ntp.github.io/tools/ntp/disable.sh | sh
Manually on FreeBSD:
service ntpd stop
sysrc ntpd_enable=NO
Manually on Linux:
systemctl stop ntpd
systemctl disable ntpd
References
- ntp
- NTP Pool Project
- Meinberg Windows port
Upgrade
FreeBSD pkg upgrade
A newer version of ntp may be available as a package. To check:
➜ ntpd --version
ntpd 4.2.8p18-a (1)
➜ pkg search ^ntp-
ntp-4.2.8p18_4 The Network Time Protocol Distribution
To update/upgrade:
pkg install -y ntp
sysrc ntpd_program=/usr/local/sbin/ntpd
FreeBSD Ports
Perhaps you need to compile ntpd for a special driver:
cd /usr/ports/net/ntp
make install clean
If the ports tree is empty, install instructions are here