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 use the common command clockdiff in Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Editor to share with you how to use the Linux command clockdiff, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The commonly used command clockdiff program in Linux uses timestamps to measure the system time difference between the destination host and the local host.

Option-o: use the IP timestamp option to measure the system time difference. Only three timestamps are used. -o1: use the IP timestamp option to measure the system time difference. Use 4 timestamps. If-o and-o1 are not set, then the ICMP timestamp is used to test the system time difference. Example lixi@lixi-desktop:~$ ping-T tsandaddr www.ustc.edu.cn-c 1 PING www.ustc.edu.cn (202.38.64.9) 56 (124) bytes of data. 64 bytes from 202.38.64.9: icmp_seq=1 ttl=62 time=0.823 ms TS: lixi-desktop.local (210.45.74.25) 12522473 absolute 210.45.74.1-251 local-gw.ustc.edu.cn (202.38.64.126) 248202.38.64.9-857514 Unrecorded hops: 3-www.ustc.edu.cn ping statistics-1 packets transmitted, 1 received, 0 packet loss Time 0ms rtt min/avg/max/mdev = 0.823 ms 0.823 ms 0.823 RRT is first obtained from the above when the RRT is small. Several ICMP timestamps. The time difference between the local host and 202.38.64.9 is about-8575140248-2511487517. Test the system time of the above routes with-o (timestamp in the IP option) and without option (ICMP routing timestamp). The result obtained is:

Lixi@lixi-desktop:~#. / clockdiff-o 202.38.64.9. Host=202.38.64.9 rtt=1 (0) ms/1ms delta=-857517ms/-857517ms Wed Dec 17 11:28:30 2008 lixi@lixi-desktop:~#. / clockdiff 202.38.64.9. Host=202.38.64.9 rtt=750 (187) ms/0ms delta=-857517ms/-857517ms Wed Dec 17 11:28:35 2008 both methods are more accurate.

Lixi@lixi-desktop:~#./clockdiff gigagate1.Princeton.EDU... Host=gigagate1.Princeton.EDU rtt=307 (21) ms/271ms delta=-5ms/-5ms Wed Dec 17 11:50:16 2008 above is to test the system time difference between the destination host and the local host with a large RTT. When using clockdiff, however, you need a bit of luck, because many routes ignore ICMP or IP timestamps.

The above is all the contents of the article "how to use Linux commands clockdiff". 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.

Share To

Development

Wechat

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

12
Report