Linux time modification (sync to time server)

Source: Internet
Author: User

Just installed a system, this system verification must be with his server time consistent to enter the background.

Entering date on your own server was found to be quite different from the standard time.

The next step is to modify the server time

General Repair Linux Server time should use the command:

Ntpdate Time Server IP "Note 1"

However, the following prompt appears after using the command:

 the 210.72. 145.44  + : ntpdate[9422 for synchronization found

#大体的意思是我提供的这台时间服务器不能用, the online time server, many are unable to use

After trying a lot of time on the server, I finally found an available one:

 - 133.100. 11.8  + ntpdate[:8445time 133.100.  11.8 Offset-26073.971007 sec

Supposedly, such a hint should be the time synchronization success. However, when viewed with date, it is still the previous time, and the time of the update does not take effect.

It's a puzzle to me. After consulting with operations colleagues, finally found the problem, is the company provided to me this server is actually using Xen virtual machine, "Xen virtual machine by default does not allow different virtual machines to use different system time, so all the virtual machine's system time is strictly synchronized with the host's system time"

If you want to modify the system time for a Xen virtual machine, you need to implement the following command at the command line:

#Echo1 >/proc/sys/xen/133.100. 11.8   + ntpdate[:Panax notoginseng 13556 time133.100.  11.8 Offset-0.016966 sec

Note 1: The Internet provides a lot of time the server's IP address, but can use very little, below I list two to be able to use when the article release time server IP:

133.100. 11.8 203.117. 180.36

#上面两台一台是日本的某大学的时间服务器, one is from Singapore. Some of the domestic time servers are either invalid or unstable.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.