linux下ping -T(也就是加入时间戳)如何使用?不知道应该带什么类型的数据,总是返回说数据类型不对。

linux下ping -T(也就是加入时间戳)如何使用?不知道应该带什么类型的数据,总是返回说数据类型不对。,第1张

-T timestamp option

Set special IP timestamp options. timestamp option may be either

tsonly (only timestamps), tsandaddr (timestamps and addresses) or

tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified

hops).

ping -T tsonly x.x.x.x

ping -T tsandaddr x.x.x.x

...

在编译Linux内核,配置时:make menuconfig --->Kernel hacking -->show timing information on printks

当选中这个选项后,启动内核,会在日志信息前面加上时间戳。

从下面的输出可以看出,时间精确到微秒(us)。

如下:

-------------------------------------------------------------------------------------------

Uncompressing Linux... done, booting the kernel.

[ 0.000000] Linux version 2.6.35.7+ (bshen@bamboo) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #109 PREEMPT Mon Nov 14 15:11:15 CST 2011

[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177

[ 0.000000] CPU: VIVT data cache, VIVT instruction cache

--------------------------------------------------------------------------------------------


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11556432.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-17
下一篇2023-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存