To synchronize your system clock using NTP protocol, adding “ntp*” packages is no longer required on Debian jessie …

From now, “systemd-timesyncd” service does the job !

NTP client configuration

Add server URLs in “/etc/systemd/timesyncd.conf” :

root@ntp:~# egrep -v "^#" /etc/systemd/timesyncd.conf

[Time]
Servers=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org

NTP client service

Start the service :

root@agent:~# systemctl start systemd-timesyncd

OK, the service is up & running :

root@ntp:~# systemctl status systemd-timesyncd.service
* systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled)
   Active: active (running) since Tue 2016-07-12 14:55:32 CEST; 1min 6s ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 20667 (systemd-timesyn)
   Status: "Using Time Server 37.187.103.150:123 (0.pool.ntp.org)."
   CGroup: /system.slice/systemd-timesyncd.service
           `-20667 /lib/systemd/systemd-timesyncd

Jul 12 14:55:32 ntp.argonay.wou systemd-timesyncd[20667]: Using NTP server 37.187.103.150:123 (0.pool.ntp.org).
Jul 12 14:55:32 ntp.argonay.wou systemd-timesyncd[20667]: interval/delta/delay/jitter/drift 32s/+0.246s/0.048s/0.000s/+0ppm
Jul 12 14:56:04 ntp.argonay.wou systemd-timesyncd[20667]: interval/delta/delay/jitter/drift 64s/+0.012s/0.036s/0.005s/+95ppm

Don’t forget to keep it started next reboot :

root@ntp:~# systemctl enable systemd-timesyncd
Created symlink from /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service to /lib/systemd/system/systemd-timesyncd.service.

Legacy “NTP” commands don’t exist anymore :

root@ntp:~# ntpq -p
-su: ntpq: command not found

 

en.pdf24.org    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *


*