Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to verify the availability of the NTP server that provides time calibration in Linux environment

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to verify the availability of the NTP server providing time calibration in the Linux environment". In the daily operation, it is believed that many people have doubts about how to verify the availability of the NTP server providing time calibration in the Linux environment. The editor consulted all kinds of materials and sorted out a simple and useful method of operation. I hope it will be helpful to answer the question of "how to verify the availability of the NTP server that provides time calibration in Linux environment"! Next, please follow the editor to study!

A recent problem goes like this:

There is no NTP server in computer room A, so you need to use the NTP server in computer room B. in general, access is not allowed across data centers, but after testing, the IP of the NTP server can be connected with PING, so we need to test whether the NTP service is available.

All the servers in computer room An are production environment servers without test servers, and the servers I manage are not accurate, which is about 10 minutes different from the Beijing standard time. In order not to affect the operation of the cluster, I cannot directly use ntpdate to update the operating system. By the way, verify whether the NTP server is available.

I came across a document saying that you can verify it by using the ntpdate command with the-d argument.

First, let's use the man command to check the parameter description of ntpdate.

-d Enable the debugging mode, in which ntpdate will go through all the steps, but not adjust the local clock. Information useful for general debugging will also be printed.

The-d parameter turns on debug mode, and the ntpdate command will complete all the steps, but without changing the local time, some useful information will be displayed.

So I used this command nervously, and the result achieved the desired effect, which is roughly like this.

[root@centos6] # ntpdate-d ntp1.aliyun.com27 Mar 22:04:38 ntpdate [1049]: ntpdate 4.2.6p5@1.2349-o Wed Dec 19 20:22:35 UTC 2018 (1) Looking for host ntp1.aliyun.com and service ntphost found: 120.25.115.20transmit (120.25.115.20) receive (120.25.115.20) transmit (120.25.115.20) receive (120.25.115.20) transmit (120.25.115.20) Receive (120.25.115.20) transmit (120.25.115.20) receive (120.25.115.20) server 120.25.115.20 Port 123stratum 2, precision-25, leap 00, trust 000refid [120.25.115.20], delay 0.07951, dispersion 0.00424transmitted 4, in filter 4reference time: e046016e.965c7e00 Wed, Mar 27 2019 22:04:30.587originate timestamp: e0460177.12bce60a Wed, Mar 27 2019 22:04:39.073transmit timestamp: e0460177.04f47dc5 Wed Mar 27 2019 22:04:39.019filter delay: 0.09312 0.07951 0.08475 0.09390 0.00000 0.00000 0.00000 filter offset: 0.004349 0.010768 0.007720 0.019682 0.000000 0.000000 0.000000delay 0.07951, dispersion 0.00424offset 0.01076827 Mar 22:04:39 ntpdate [1049]: adjust time server 120.25.115.20 offset 0.010768 sec The study on "how to verify the availability of the NTP server that provides time calibration in Linux environment" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report