Still with the latest Debian Jessie image where I have my Asterisk running on the ARM device Rasperry Pi, I find that the clock source synchronisation is still being accomplished with the NTP daemon rather than with the "timedated" daemon.
Below describes the steps to remove the setup of legacy NTP configuration, and setup the new light weight “systemd-timedated” configuration to synchronise your system’s clock from the Internet.
First shutdown the NTP daemon process, disable the auto-start setup and deinstall the packages with the following commands on the shell prompt:
You may do the same steps to de-activate the "fake-hwclock" deamon that takes care of the timekeeping if your device does not have a RTC source built-in. Issue the following commands on the shell prompt:
Note: The back-quote in the "systemctl" command and the "sleep" statement are very important to keep!
To finally enable the automatic start-up of the system’s clock synchronisation during boot-up using the "systemd-timesyncd" service, execute the following commands on the shell prompt:
With this approach, we leave it up to "systemd" to start up the relevant services for date and time synchronisation from the RTC chip during boot up, and if the computer is also connected to the Internet, to synchronise the OS and RTC with the corresponding source of network time.
To verify its proper operation, after a little while, simply execute the following command on the shell prompt:
timedatectl
It shall provide an output similar to the following:
Local time: Wed 2017-03-18 09:44:46 CET
Universal time: Wed 2017-03-18 08:44:46 UTC
RTC time: Wed 2017-03-18 08:44:46
Time zone: … (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
Similar to the legacy "fake-hwclock" mechanism, a file "/var/lib/systemd/clock" will be created and regularly updated with the time of last clock synchronisation with the network time.
Hope you find this little tutorial useful ;-)
Last edit: carriba 2017-03-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Still with the latest Debian Jessie image where I have my Asterisk running on the ARM device Rasperry Pi, I find that the clock source synchronisation is still being accomplished with the NTP daemon rather than with the "timedated" daemon.
Below describes the steps to remove the setup of legacy NTP configuration, and setup the new light weight “systemd-timedated” configuration to synchronise your system’s clock from the Internet.
First shutdown the NTP daemon process, disable the auto-start setup and deinstall the packages with the following commands on the shell prompt:
You may do the same steps to de-activate the "fake-hwclock" deamon that takes care of the timekeeping if your device does not have a RTC source built-in. Issue the following commands on the shell prompt:
With your favourite text editor, modify the file “/etc/systemd/timesyncd.conf” to have the following contents:
You may choose the NTP sources according to your region as described with the "NTP Pool Time Servers" list or simply consult the "How do I use pool.ntp.org" instructions.
With your favourite text editor, modify the file “/etc/rc.local” to have the following contents:
Note: The back-quote in the "systemctl" command and the "sleep" statement are very important to keep!
To finally enable the automatic start-up of the system’s clock synchronisation during boot-up using the "systemd-timesyncd" service, execute the following commands on the shell prompt:
With this approach, we leave it up to "systemd" to start up the relevant services for date and time synchronisation from the RTC chip during boot up, and if the computer is also connected to the Internet, to synchronise the OS and RTC with the corresponding source of network time.
To verify its proper operation, after a little while, simply execute the following command on the shell prompt:
timedatectl
It shall provide an output similar to the following:
Similar to the legacy "fake-hwclock" mechanism, a file "/var/lib/systemd/clock" will be created and regularly updated with the time of last clock synchronisation with the network time.
Hope you find this little tutorial useful ;-)
Last edit: carriba 2017-03-28