Configure Linux NTP
Users who create a Virtual Server with Rocky Linux or Oracle Linux via the Samsung Cloud Platform Console need additional configuration for time synchronization (NTP:Network Time Protocol). For other standard Linux images (RHEL, Alma Linux, Ubuntu), NTP is already configured, so no extra setup is required.
Installing NTP Daemon
You can configure NTP by installing the chrony daemon. To install the chrony daemon, follow the steps below.
Check whether the chrony package is installed by using the dnf command as the root user on the OS of the Virtual Server.
Color modednf list chronydnf list chronyCode block. dnf command - command to verify the chrony package installation - If the chrony package is installed, the following result is displayed.
[root@scp-test-vm-01 ~] # dnf list chrony
Last metadata expiration check: 1:47:29 ago on Wed 19 Feb 2025 05:55:57 PM KST.
Installed Packages
chrony.x86_64 3.5-1.0.1.el8 @anaconda[root@scp-test-vm-01 ~] # dnf list chrony
Last metadata expiration check: 1:47:29 ago on Wed 19 Feb 2025 05:55:57 PM KST.
Installed Packages
chrony.x86_64 3.5-1.0.1.el8 @anaconda- If the chrony package is not installed, install the chrony package using the dnf command.Color mode
dnf install chrony -ydnf install chrony -ycode block. dnf command - chrony package installation verification command
Configuring NTP Daemon
To configure the chrony daemon, follow these steps.
- Open the /etc/chrony.conf file using a text editor (e.g., vim).
- Add the following content to the /etc/chrony.conf file and save it.
server 198.19.0.54 iburstserver 198.19.0.54 iburst- Use the systemctl command to configure the chrony daemon to start automatically.
systemctl enable chronydsystemctl enable chronydRestart the chrony daemon using the systemctl command.
Color modesystemctl restart chronydsystemctl restart chronydcode block. systemctl command - restart chrony daemon Run the chronyc sources command with the “v” option (display detailed information) to check the IP address of the configured NTP server and verify whether synchronization is in progress.
Color modechronyc sources -vchronyc sources -vCode block. chronyc sources command - check NTP synchronization - When you run the chronyc sources command, the following result is displayed.
[root@scp-test-vm-01 ~] # chronyc sources -v
210 Number of sources = 1
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
=========================================================================
^* 198.19.0.54 2 6 377 52 -129us[ -128us] +/- 14ms[root@scp-test-vm-01 ~] # chronyc sources -v
210 Number of sources = 1
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
=========================================================================
^* 198.19.0.54 2 6 377 52 -129us[ -128us] +/- 14ms- Run the chronyc tracking command to check the synchronization metrics.Color mode
[root@scp-test-vm-01 ~] # chronyc tracking Reference ID : A9FEA9FE (198.19.0.54) Stratum : 3 Ref time (UTC) : Wed Feb 19 18:48:41 2025 System time : 0.000000039 seconds fast of NTP time Last offset : -0.000084246 seconds RMS offset : 0.000084246 seconds Frequency : 21.667 ppm slow Residual freq : +4.723 ppm Skew : 0.410 ppm Root delay : 0.000564836 seconds Root dispersion : 0.027399288 seconds Update interval : 2.0 seconds Leap status : Normal[root@scp-test-vm-01 ~] # chronyc tracking Reference ID : A9FEA9FE (198.19.0.54) Stratum : 3 Ref time (UTC) : Wed Feb 19 18:48:41 2025 System time : 0.000000039 seconds fast of NTP time Last offset : -0.000084246 seconds RMS offset : 0.000084246 seconds Frequency : 21.667 ppm slow Residual freq : +4.723 ppm Skew : 0.410 ppm Root delay : 0.000564836 seconds Root dispersion : 0.027399288 seconds Update interval : 2.0 seconds Leap status : Normalcode block. chronyc tracking command - NTP synchronization metric