Linux: Time synchronization

Source: Internet
Author: User

Time synchronization

    • Setup of hardware Time
hwclock Clock Clock and hwclock usage similar, only one on the line, but clock command in addition to support the x86 hardware system, but also support the Alpha hardware system.

Viewing hardware time

---R

    • Synchronization of system time and hardware time

Synchronize system time and hardware time, you can use the Hwclock command.

Modify hardware time on a system-time basis

Hwclock--systohc<==-w

Modify the system time based on the hardware time

Hwclock---

    • Update time from a time server with Ntpdate

If your Linux system doesn't ntpdate this command at all,

Yum Install

After the installation, you do not have to do any configuration, and do not need to test directly

 Time . nist.gov    A £ ºntpdate[5014time207.200.  81.113 Offset-0.018788 sec  

If you go out above the description, the synchronization was successful. Then add the following to the/etc/crontab.

# Example of job Definition: #.----------------Minute (0- -)  # | .-------------Hour (0- at)  # |  | .----------Day of Month (1- to)  # |  |  | .-------Month (1- A) OR jan,feb,mar,apr ... #|  |  |  | .----Day of Week (0-6) (sunday=0Or7) OR Sun,mon,tue,wed,thu,fri,sat #|  |  |  | |  # * * * * * * user-name Command to be executed*/ 5 *   * * * ntpdate time . nist.gov #域名或IP synchronized every 10 minutes. 

Linux: Time synchronization

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.