The page has been translated by Gen AI.

Linux NTP Setting

If a user creates a Virtual Server with Rocky Linux or Oracle Linux via the Samsung Cloud Platform Console, additional configuration is required for time synchronization (NTP: Network Time Protocol). For other OS standard Linux images (RHEL, Alma Linux, Ubuntu), NTP is already configured, so no additional setup is needed.

Install NTP Daemon

You can install the chrony daemon to configure NTP. To install the chrony daemon, follow the steps below.

Reference
For detailed information about chrony, please refer to the chronyc page.
  1. Check whether the chrony package is installed using the dnf command as the root user of the OS of the Virtual Server.

    Color mode
    dnf list chrony
    dnf list chrony
    Code block. dnf command - chrony package installation verification command

    • chrony If the chrony package is installed, the following result is displayed.
    Color mode
    [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  
    Code block. dnf command - chrony package installation verification result
  2. If the chrony package is not installed, use the dnf command to install the chrony package.

    Color mode
    dnf install chrony -y
    dnf install chrony -y
    Code block. dnf command - chrony package installation verification command

NTP Daemon Setup

Reference
For detailed information about chrony, refer to the chronyc page.

To set up the chrony daemon, follow these steps.

  1. Load the /etc/chrony.conf file using a text editor (e.g., vim).

  2. Add the following content to the /etc/chrony.conf file and save.

    Color mode
    server 198.19.0.54 iburst
    server 198.19.0.54 iburst
    Code block. /etc/chrony.conf edit
  3. Set it to automatically start the chrony daemon using the systemctl command.

    Color mode
    systemctl enable chronyd
    systemctl enable chronyd
    Code block. systemctl command - chrony daemon auto start setting
  4. Restart the chrony daemon using the systemctl command.

    Color mode
    systemctl restart chronyd
    systemctl restart chronyd
    Code block. systemctl command - restart chrony daemon

  5. 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 mode
    chronyc sources -v
    chronyc sources -v
    Code block. chronyc sources command - NTP synchronization check

    • When you run the chronyc sources command, the following result is displayed.
    Color mode
    [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
    Code block. chronyc sources command - NTP synchronization check
  6. 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           : Normal
    Code block. chronyc tracking command - NTP synchronization metric

IP Change
Setting up RHEL Repo and WKMS