OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

4.1.1. Configuring timedatectl and timesyncd


The current status of time and time configuration via timedatectl and timesyncd can be checked with

timedatectl status.


$ timedatectl status


Local time: Fr 2018-02-23 08:47:13 UTC

Universal time: Fr 2018-02-23 08:47:13 UTC

RTC time: Fr 2018-02-23 08:47:13

Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes



systemd-timesyncd.service active: yes

RTC in local TZ: no


If chrony is running it will automatically switch to: [...]

systemd-timesyncd.service active: no


Via timedatectl an admin can control the timezone, how the system clock should relate to the hwclock and if permanent synronization should be enabled or not. See man timedatectl for more details.

timesyncd itself is still a normal service, so you can check its status also more in detail via.


$ systemctl status systemd-timesyncd

systemd-timesyncd.service - Network Time Synchronization

Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)

Active: active (running) since Fri 2018-02-23 08:55:46 UTC; 10s ago Docs: man:systemd-timesyncd.service(8)

Main PID: 3744 (systemd-timesyn)

Status: "Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com)." Tasks: 2 (limit: 4915)

CGroup: /system.slice/systemd-timesyncd.service

|-3744 /lib/systemd/systemd-timesyncd


Feb 23 08:55:46 bionic-test systemd[1]: Starting Network Time Synchronization... Feb 23 08:55:46 bionic-test systemd[1]: Started Network Time Synchronization.

Feb 23 08:55:46 bionic-test systemd-timesyncd[3744]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).

The nameserver to fetch time for timedatectl and timesyncd from can be specified in /etc/systemd/ timesyncd.conf and additional config files can be stored in /etc/systemd/timesyncd.conf.d/. The entries for NTP= and FallbackNTP= are space separated lists. See man timesyncd.conf for more.


Top OS Cloud Computing at OnWorks: