Following command can be used to check NTP synchronization and check and troubleshoot NTP issues.
For more accurate analysis of NTP synchronization, it is best to run above command in loop for 3 times and check the output. Below is command to run above command in loop for 3 times. Command can be modified based on how many times you want to run it in loop. Just change value 3 in below command to the number you want to run in loop.
Below is example output of above command.
+10.10.10.1 10.30.30.1 4 u 861 1024 377 1.323 -2.567 0.526
-10.10.10.2 10.30.30.3 4 u 902 1024 377 0.528 -3.709 0.046
+10.10.10.3 10.30.30.2 4 u 159 1024 377 1.279 -2.304 0.109
*10.10.10.4 10.30.30.1 4 u 1046 1024 377 0.350 -1.573 0.005
Important things to check in this output are reach, delay, offset and jitter. Below are details.
http://www.ntp.org/ntpfaq/NTP-s-trouble.htm#Q-MON-REACH
https://www.streetdirectory.com/travel_guide/126336/computers/common_ntp_server_terminology_explained.html
ntpq -pn
For more accurate analysis of NTP synchronization, it is best to run above command in loop for 3 times and check the output. Below is command to run above command in loop for 3 times. Command can be modified based on how many times you want to run it in loop. Just change value 3 in below command to the number you want to run in loop.
for i in {1..3}; do echo $i && ntpq -pn && echo "=============================" ; done
Below is example output of above command.
remote refid st t when poll reach delay offset jitter
==============================================================================+10.10.10.1 10.30.30.1 4 u 861 1024 377 1.323 -2.567 0.526
-10.10.10.2 10.30.30.3 4 u 902 1024 377 0.528 -3.709 0.046
+10.10.10.3 10.30.30.2 4 u 159 1024 377 1.279 -2.304 0.109
*10.10.10.4 10.30.30.1 4 u 1046 1024 377 0.350 -1.573 0.005
Important things to check in this output are reach, delay, offset and jitter. Below are details.
- reach - value should be 377. contains the results of the most recent eight NTP updates. If all eight are successful, this field will read 377. This number is in octal, so eight successes in octal will be represented by 377
- delay - value should be lower which means there is minimal delay in communication between local machine and NTP server. Value is in milliseconds.
- offset - time difference between local machine and NTP server. Lower the value, healthy is NTP. Value is in milliseconds.
- jitter - Amount of variance in time between local machine and NTP server. Lower the value, healthy is NTP. Value is in milliseconds.
Products to which Article Applies
All Linux environments
Additional References
https://www.streetdirectory.com/travel_guide/126336/computers/common_ntp_server_terminology_explained.html
tarun boyella
No comments:
Post a Comment