How Do I Synchronize Time with the NTP Server?
Background
If you use IEF to manage your edge node, ensure that the time of the edge node is consistent with the UTC time. Otherwise, the monitoring data and logs of the edge node may be inaccurate.
You can select a proper NTP server for time synchronization to ensure time consistency.
Prerequisites
Network Time Protocol daemon (ntpd) has been installed on the edge node. For example, you have installed ntpd by running the yum install -y ntp command on the edge node running CentOS.
Procedure
- Log in to a Linux ECS.
- Run the following command to open the ntp.conf file:
vim /etc/ntp.conf
- Add the following statement to configure the NTP server:
server Domain name of the NTP server
Example:
server 0.pool.ntp.org
- Run either of the following command to start the NTP service:
SUSE OS:
service ntp restart
CentOS:
systemctl restart ntpd
Run the appropriate command based on the OS running on the ECS.
- Run the following command to check whether the time of the ECS is synchronized with that of the NTP server:
ntpq -p
If "*" is displayed, the time has been synchronized.
It takes several minutes to perform NTP time synchronization for the first time.
- Set the NTP service to run automatically during system startup:
SUSE OS:
chkconfig ntp on
CentOS:
chkconfig ntpd on
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.