Notes Linux NTP command (ESX applies)

Source: Internet
Author: User

Original works, allow reprint, please be sure to use hyperlinks in the form of the original source of the article, author information and this statement. Otherwise, the legal liability will be investigated. http://delxu.blog.51cto.com/975660/307513 "Recommended reading" This article is best: Http://wiki.ubuntu.org.cn/Quick_HOWTO_:_Ch24_:_The_NTP_Server/zh
NTP command line: http://www.linux-consulting.com/NTP/NTP.Commands.txt
Timekeep Best practice for Linux Guest:http://kb.vmware.com/selfservice/microsites/search.do?language=en_us&cmd =displaykc&externalid=1006427
Https://www.vmware.com/pdf/vmware_timekeeping.pdf ==========================================/etc/ntp.conf file is Esx /linux The primary configuration file for NTP
Start, stop, restart NTP, with the following command: [[email protected] tmp]# service NTPD start
[[Email protected] tmp]# service NTPD stop
[Email protected] tmp]# service ntpd restart
Use the following command to check if the NTP service is running [[email protected] tmp]# pgrep ntpd
Check NTP synchronization Status
[Email protected] tmp]# ntpq-p
To manually synchronize with a server (you must follow the server address), running this command requires shutting down the NTPD service first. Use service ntpd stop to stop Ntpd[[email protected] tmp]# ntpdate 0.pool.ntp.org
The Ntpdate command runs on the Smallfry machine 3 times to synchronize the 192.168.1.100 server, but it must run when the NTPD process stops, so you need to stop ntpd, run Ntpdate, and then run NTPD. [[Email protected] tmp]# service NTPD stop
[Email protected] tmp]# ntpdate-u 192.168.1.100
Looking for host 192.168.1.100 and service NTP
Host Found:bigboy.my-site.com
08:03:38 ntpdate[2472]: Step time server 192.168.1.100 offset 28993.084943 sec
[Email protected] tmp]# ntpdate-u 192.168.1.100
Looking for host 192.168.1.100 and service NTP
Host Found:bigboy.my-site.com
08:03:40 ntpdate[2472]: Step time server 192.168.1.100 offset 2.467652 sec
[Email protected] tmp]# ntpdate-u 192.168.1.100
Looking for host 192.168.1.100 and service NTP
Host Found:bigboy.my-site.com
08:03:42 ntpdate[2472]: Step time server 192.168.1.100 offset 0.084943 sec
[[Email protected] tmp]# service NTPD start
[Email protected] tmp]#

Check the log for ntpd when troubleshooting
[Email protected] tmp]# Cat/var/log/messages | grep ntpd

This article is from "Delxu Tech Notebook" blog, please make sure to keep this source http://delxu.blog.51cto.com/975660/307513

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.