From 3ae6d2676efb2de612d71a4b5dcdee4790ef96b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Fri, 9 Apr 2021 15:18:01 +0200 Subject: [PATCH 1/7] check-before-deployment: Add info about chronyd/chronyc on CentOS 8 On CentOS 8 Chrony is used by default or NTP services. - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/using-chrony-to-configure-ntp#sect-checking_if_chrony_is_synchronized --- check-before-deployment.md | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/check-before-deployment.md b/check-before-deployment.md index 6adc51f896a61..b3be43a3fb42b 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -189,6 +189,22 @@ To check whether the NTP service is installed and whether it synchronizes with t Active: active (running) since 一 2017-12-18 13:13:19 CST; 3s ago ``` + - If it returns `Unit ntpd.service could not be found.` then try the following: + + {{< copyable "shell-regular" >}} + + ```bash + sudo systemctl status cronyd.service + ``` + + ``` + chronyd.service - NTP client/server + Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) + Active: active (running) since Mon 2021-04-05 09:55:29 EDT; 3 days ago + ``` + + This would mean that your system is configured to use `chronyd` instead of `ntpd` to do synchronization with NTP. If this is the case proceed to step 3. + 2. Run the `ntpstat` command to check whether the NTP service synchronizes with the NTP server. > **Note:** @@ -221,6 +237,48 @@ To check whether the NTP service is installed and whether it synchronizes with t Unable to talk to NTP daemon. Is it running? ``` +3. Run the `chronyc tracking` command to check wheter the Chrony service synchronizes with the NTP server. + + > **Note:** + > + > This only applies to system that use Chrony instead of NTPd. + + {{< copyable "shell-regular" >}} + + ```bash + chronyc tracking + ``` + + - If it returns `Leap status : Normal`, then the synchronization process is normal. + + ``` + Reference ID : 5EC69F0A (ntp1.time.nl) + Stratum : 2 + Ref time (UTC) : Thu May 20 15:19:08 2021 + System time : 0.000022151 seconds slow of NTP time + Last offset : -0.000041040 seconds + RMS offset : 0.000053422 seconds + Frequency : 2.286 ppm slow + Residual freq : -0.000 ppm + Skew : 0.012 ppm + Root delay : 0.012706812 seconds + Root dispersion : 0.000430042 seconds + Update interval : 1029.8 seconds + Leap status : Normal + ``` + + - The following situation indicates the synchronization is not synchronizing normally: + + ``` + Leap status : Not synchronised + ``` + + - The following situation indicates the `chronyd` service is not running normally: + + ``` + 506 Cannot talk to daemon + ``` + To make the NTP service start synchronizing as soon as possible, run the following command. Replace `pool.ntp.org` with your NTP server. {{< copyable "shell-regular" >}} From 874cbb4173a9814102a0cc20a90505ce770e1228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Thu, 27 May 2021 14:35:50 +0200 Subject: [PATCH 2/7] Update check-before-deployment.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- check-before-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index b3be43a3fb42b..02fa51e767c08 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -203,7 +203,7 @@ To check whether the NTP service is installed and whether it synchronizes with t Active: active (running) since Mon 2021-04-05 09:55:29 EDT; 3 days ago ``` - This would mean that your system is configured to use `chronyd` instead of `ntpd` to do synchronization with NTP. If this is the case proceed to step 3. + If your system is configured to use `chronyd`, proceed to step 3. 2. Run the `ntpstat` command to check whether the NTP service synchronizes with the NTP server. From 086952380766ff2fc534a7dbd2f7526446d0641e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Thu, 27 May 2021 14:36:00 +0200 Subject: [PATCH 3/7] Update check-before-deployment.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- check-before-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index 02fa51e767c08..d9052ceea962f 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -249,7 +249,7 @@ To check whether the NTP service is installed and whether it synchronizes with t chronyc tracking ``` - - If it returns `Leap status : Normal`, then the synchronization process is normal. + - If the command returns `Leap status : Normal`, the synchronization process is normal. ``` Reference ID : 5EC69F0A (ntp1.time.nl) From b1f1b00c54626aa4dd258f4f847556e477c4a35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Thu, 27 May 2021 14:40:53 +0200 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- check-before-deployment.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index d9052ceea962f..3e8bb0893989c 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -267,13 +267,13 @@ To check whether the NTP service is installed and whether it synchronizes with t Leap status : Normal ``` - - The following situation indicates the synchronization is not synchronizing normally: + - If the command returns the following result, an error occurs in the synchronization: ``` Leap status : Not synchronised ``` - - The following situation indicates the `chronyd` service is not running normally: + - If the command returns the following result, the `chronyd` service is not running normally: ``` 506 Cannot talk to daemon From c1deb83471d7de6db91ca11e60ed64e5da247c7c Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Mon, 31 May 2021 19:48:42 +0800 Subject: [PATCH 5/7] Update check-before-deployment.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniël van Eeden --- check-before-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index 3e8bb0893989c..fbb239ebf8c4d 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -189,7 +189,7 @@ To check whether the NTP service is installed and whether it synchronizes with t Active: active (running) since 一 2017-12-18 13:13:19 CST; 3s ago ``` - - If it returns `Unit ntpd.service could not be found.` then try the following: + - If it returns `Unit ntpd.service could not be found.`, then try the following command to see whether your system is configured to use `chronyd` instead of `ntpd` to perform clock synchronization with NTP: {{< copyable "shell-regular" >}} From 980e0d5d4edc1abd28ccd9a223f2155799b3f517 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 1 Jun 2021 11:48:35 +0800 Subject: [PATCH 6/7] Update check-before-deployment.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniël van Eeden --- check-before-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index fbb239ebf8c4d..7088af72e44de 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -241,7 +241,7 @@ To check whether the NTP service is installed and whether it synchronizes with t > **Note:** > - > This only applies to system that use Chrony instead of NTPd. + > This only applies to systems that use Chrony instead of NTPd. {{< copyable "shell-regular" >}} From e2a37e08d761359f6a6a2a5a35954a80f2289d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 1 Jun 2021 07:28:11 +0200 Subject: [PATCH 7/7] Update check-before-deployment.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- check-before-deployment.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index 7088af72e44de..b08a123ee94bf 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -191,19 +191,19 @@ To check whether the NTP service is installed and whether it synchronizes with t - If it returns `Unit ntpd.service could not be found.`, then try the following command to see whether your system is configured to use `chronyd` instead of `ntpd` to perform clock synchronization with NTP: - {{< copyable "shell-regular" >}} - - ```bash - sudo systemctl status cronyd.service - ``` - - ``` - chronyd.service - NTP client/server - Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) - Active: active (running) since Mon 2021-04-05 09:55:29 EDT; 3 days ago - ``` - - If your system is configured to use `chronyd`, proceed to step 3. + {{< copyable "shell-regular" >}} + + ```bash + sudo systemctl status cronyd.service + ``` + + ``` + chronyd.service - NTP client/server + Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled) + Active: active (running) since Mon 2021-04-05 09:55:29 EDT; 3 days ago + ``` + + If your system is configured to use `chronyd`, proceed to step 3. 2. Run the `ntpstat` command to check whether the NTP service synchronizes with the NTP server.