From c426d9bbc68999f796594171c20d61c1031dabe6 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 8a192b28ff143..b1d3aef34f6f7 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 3e75996d1ee5fd36463d94b37ff2988855f87a1f 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 b1d3aef34f6f7..efc5655f58d26 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 436bf568bb9faf3ea760c234669720979a362f7d 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 efc5655f58d26..9aa4a974bb017 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 c33b983986b00a23e39759e8e98a979b08ed858a 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 9aa4a974bb017..56967039479eb 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 5fdb93c0c8ebd0eccc31e96a4342188417dfc812 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 56967039479eb..b1d26a5976c8f 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 7fb8f8299f5757a1fe599cc3cd3fdf4961a87200 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 b1d26a5976c8f..9b8c0dc9267d6 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 2cd96cfec137d436b63ad990759fae2891191f8d 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 9b8c0dc9267d6..b231971fbd262 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.