In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use ntpdate for time synchronization", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use ntpdate for time synchronization" this article.
When the Linux server runs for a long time, there will be a certain error in the system time. In general, you can use the date command to set the time, but the time difference between multiple machines is required when doing database cluster slicing and other operations, so you need to use ntpdate for time synchronization.
Brief introduction to Command
The ntpddate command is used to set the date and time using Network timing Protocol (NTP). It can also be used to synchronize time, and this command requires root administrator privileges to execute.
[root@centos7 ~] # ntpdate-bash: ntpdate: command not found [root@centos7 ~] # yum install ntpdate- y syntax format
Ntpdate [- b] [- d] [- s] [- u] [- aKeyid] [- eAuthenticationDelay] [- kKeyFile] [- oVersion] [- pSamples] [- tTimeOut] Server...
Option description-aKeyid # uses Keyid to authenticate all packets-b # increases the clock time by calling the settimeofday subroutine-d # specifies debugging mode-eAuthenticationDelay # specifies the number of seconds to delay authentication processing. -oVersion # specifies the implementation of the NTP version used-pSamples # specifies the number of samples taken from each server-s # specifies log operations-tTimeOut # specifies the time to wait for a response-u # specifies an example of sending packets using an unprivileged port
Synchronization time
[root@centos7 ~] # dateSun Mar 28 13:09:22 EDT 2021 [root@centos7 ~] # ntpdate 0.centos.pool.ntp.org28 Mar 23:11:13 ntpdate [5516]: step time server 182.92.12.11 offset 36090.505486 sec [root@centos7 ~] # dateSun Mar 28 23:11:21 EDT 2021 [root@centos7] # ntpdate 0.centos.pool.ntp.org28 Mar 23:11:55 ntpdate [5519]: step time server 182.92.12.11 offset-0.722305 Sec [root@centos7 ~] # ntpdate asia.pool.ntp.org Hwclock-w28 Mar 23:12:28 ntpdate [5520]: adjust time server 133.243.238.163 offset-0.013789 sec is all the content of this article "how to use ntpdate for time synchronization". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.