NTPsec - BYO-NTP/recipes GitHub Wiki
Install
Install, configure, and start NTPsec.
curl -sS https://byo-ntp.github.io/tools/ntpsec/install.sh | sh
source code, and discussion.
Restart
FreeBSD
service ntpd restart
Pi OS / Debian / Linux
service ntpsec restart
Observe
- Use ntpq commands
- Measure your offset
- Use something like telegraf + influxdb + grafana for statistics.
Disable
FreeBSD
service ntpd stop
sysrc ntpd_enable=NO
Linux
systemctl stop ntpsec
systemctl disable ntpsec
Rebuild / Update / Upgrade
Should it be necessary to build/rebuild NTPsec from sources, these instructions should help.
Ports
FreeBSDcd /usr/ports/net/ntpsec
pkg install -y portconfig bison pkgconf
git pull
make install clean
Linux build from source
Useful to build NTPsec with the gpsd refclock, or to build a version newer than Debian 12's v1.2.2, released in 2022-12-28.
apt install -y git
git clone --depth=1 https://github.com/ntpsec/ntpsec.git
cd ntpsec
export PYTHONPATH=/usr/local/lib/python3.11/site-packages
./buildprep
./waf configure --refclock=local,nmea,pps,shm,gpsd \
--pythondir=/usr/local/lib/python3.11/dist-packages \
--pythonarchdir=/usr/local/lib/python3.11/dist-packages
./waf build
./waf install