1.4 KiB
1.4 KiB
LPIC-1 108.1: Maintaining system time
Which NTP client runs, the hardware clock, and chrony's sources.
Before you start
The lab notes which NTP client runs now, and saves chrony's configuration (if chrony is installed) so reset can put it back. Changing the NTP sources needs the VM to reach the internet on UDP port 123 to see them work, but the check doesn't depend on that.
Tasks
- Run
timedatectland find out which NTP client the VM uses (systemctl status chronyd chrony systemd-timesyncd). Write the name of its service to/root/lab-answers/1. - Compare
sudo hwclockwithdate -u. Then read/etc/adjtime, if it exists. Writeutcorlocalto/root/lab-answers/2: the time the hardware clock keeps. - Install chrony if it isn't there (it replaces timesyncd), and read
chronyc sources -vandchronyc tracking. Then change chrony's sources to just the poolpool.ntp.org, restart it, and watch the sources change withchronyc sources.
Hints
systemctl is-active chronyd chrony systemd-timesyncd.- The third line of
/etc/adjtimesaysUTCorLOCAL; without the file, the hardware clock is taken to be UTC.timedatectlshows it as "RTC in local TZ". /etc/chrony.confon the RHEL family;/etc/chrony/chrony.confand itssources.ddirectory on Debian and Ubuntu. Comment out the otherpoolandserverlines.chronyc -N sourcesshows the names.