Ntpstat and ntpq-p

Source: Internet
Author: User

Ntpstat and ntpq-p

NTP server [Network Time Protocol (NTP)] is a Protocol used to synchronize the computer Time. It can enable the computer to access its server or clock source (such as quartzels, GPS, and so on) for synchronization, it can provide high-precision time correction (the difference between the LAN and the standard is less than 1 millisecond, And the WAN is dozens of milliseconds ), encryption validation can be used to prevent malicious protocol attacks. The following describes the two commands for viewing the status of ntpserver and their differences.
1. ntpstat
The ntpstat command is used to check the time synchronization status. It usually takes 5 to 10 minutes to connect to and synchronize data. Therefore, wait a moment after the server is started.

When starting, it is generally:

# Ntpstat

Unsynchronised

Time server re-starting

Polling server every 64 s

After connection and synchronization:

Synchronised to NTP server (202.120.2.101) at stratum 4
Time correct to within 1192 MS
Polling server every 64 s

2. ntpq-p

 
 
  1. [root@localhost ~]# ntpq -p
  2. remote refid st t when poll reach delay offset jitter
  3. ==============================================================================
  4. dns1.synet.edu. .INIT. 16 u - 1024 0 0.000 0.000 0.000
  5. *time.ume.tubita .PPS. 1 u 107 128 377 397.503 -24.042 0.538
  6. -211.233.84.186 204.123.2.5 2 u 100 128 377 124.228 24.973 0.524
  7. +dns.sjtu.edu.cn 79.213.241.147 3 u 94 128 377 20.878 3.339 0.512
  8. +Hshh.org 216.218.192.202 2 u 45 128 377 31.205 10.731 1.278
  9. dns2.synet.edu. .INIT. 16 u - 1024 0 0.000 0.000 0.000

Note:

* Indicates the ntp server currently in use. The local machine is selected here;

St: stratum class. The smaller the value, the higher the precision of ntp serving;

When: I have performed time synchronization updates several seconds ago;

Poll indicates the number of milliseconds to synchronize with the ntp server;

Reach: the number of times that the NTP server on the upper layer requires updates;

Delay: the time delay during network transmission;

Offset: the result of time compensation;

Jitter: time difference between Linux system time and BIOS hardware time

Note: After the NTP server is restarted, the client will wait for 5 minutes to synchronize time with it. Otherwise, the error "no server suitable for synchronization found" will be displayed. You can run the watch ntpq-p command to monitor the waiting time.



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.