Trace: ntp

ntp

Back  
 Next

ntp

I remember looking at this circa 2016 - 2021 and letting go at that time, crony had just been released and systemd was still relatively new at that time.

systemd commands

  • sudo systemctl status systemd-timesyncd
    • The default configuration is shown in /etc/systemd/timesyncd.conf (All the defaults are shown commented out)
    • Copy the default configuration in /etc/systemd/timesyncd.conf to /etc/systemd/timesyncd.conf.d/timesyncd.conf and modify options in /etc/systemd/timesyncd.conf.d/timesyncd.conf
  • timedatectl timesync-status

ntp servers

ntp servers can be checked using the ntpdate command, which can be loaded in Debian with sudo apt install ntpsec-ntpdate

List of local ntp servers

chronyc

chronyc can be used to query chronyd. The following are some key queries. Note chrony help will provide a list of available commands.

  • sources -v will list information about the current sources
  • tracking Display system time information
  • nptdata display information about last valid measurement
  • activity check how many NTP sources are online/offline
  • serverstats Display statistics of the server
  • authdata -v Display information about authentication

/etc/chrony/chrony.conf

docker-compose.yml

  • docker exec -ti chrony /bin/sh to get shell access to container

pool pool.ntp.org iburst initstepslew 10 pool.ntp.org driftfile /var/lib/chrony/chrony.drift rtcsync cmdport 0</code>++++

Reference

/app/www/public/data/pages/docker_notes/ntp.txt · Last modified: 2025-11-14 Fri wk46 22:12
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International