我ping服务器,-t是不停的发ping包,我想限定时间,如何设置参数,比如ping60秒,如何设置?
ping命令详解···你可以学习下· 对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-wz timeout] destination-list Options: -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. 不停的ping地方主机,直到你按下Control-C。 此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 -a Resolve addresses to hostnames. 解析计算机NetBios名。 示例:C:\>ping -a 192.168.1.21 Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Ping statistics for 192.168.1.21: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms 从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 -n count Number of echo requests to send. 发送count指定的Echo数据包数。 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: C:\>ping -n 50 202.103.96.68 Pinging 202.103.96.68 with 32 bytes of data: Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Request timed out. ……………… Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Ping statistics for 202.103.96.68: Packets: Sent = 50, Received = 48, Lost = 2 (4% loss)

怎么为ping命令设置超时时间
w后面单位为秒。-w deadlineSpecify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packetare sent, it waits either for deadline expire or until count probes are answered or for some error notification from network.-W timeoutTime to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs.
Ping的格式是这样使用的ping+空+网络地址+空+—t。

ping命令怎么带时间
一般就是“ping 目的ip地址”;如果需要持续ping,那么“ping -t 目的ip地址”;如果需要指定ping包大小,那么“ping -l 包字节数 目的ip地址”。 网络测试,基本就用上面三种方式吧用法: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name选项:-t Ping 指定的主机,直到停止。若要查看并继续操作 - 请键入 Control-Break;若要停止 - 请键入 Control-C。-a 将成。-n count 要发送的回显请求数。-l size 发送大小。-f 在数据包中设置“不分段”标志(仅适用于)。-i TTL 生存时间。-v TOS(仅适用于。该设置已不赞成使用,且对 IP 标头中的服务字段类型没有任何影响)。-r count 记录计数跃点的路由(仅适用于)。-s count 计数跃点的(仅适用于 IPv4)。-j host-list 与主机列表一起的松散(仅适用于 IPv4)。-k host-list 与主机列表一起的严格(仅适用于 IPv4)。-w timeout 等待每次回复的超时时间(毫秒)。-R 同样使用路由标头测试反向路由(仅适用于)。-S srcaddr 要使用的源地址。-4 强制使用 IPv4。 -6 强制使用

ping命令结果中如何显示时间
可以通过批处理实现,在后面加上时间。 @echo off d: for /l %%i in (1,1,%999999999%) do ( ping %1192.168.1.1 -n 1% && echo %% >>ping.txt date /t >>ping.txt time /t >>ping.txt ) pause 扩展资料: 注意事项 ping命令脚本: :top set BACKUPDATE=%date:~0,4%%date:~5,2%%date:~8,2% 举锋 获取当前系统的年月正销晌日 echo %time% >> flogin.aspx_%BACKUPDATE%log.txt ping -n 1 www.baidu.com | findstr "TTL"斗中 >> flogin.aspx_%BACKUPDATE%log.txt goto top:top echo %time% >> gateway_%BACKUPDATE%log.txt 当前系统时间追加到txt文档中 ping -n 1 127.0.0.1 | findstr "TTL" >> gateway_%BACKUPDATE%log.txt goto top
命令本身是不具备的,可以通过批处理实现,在纤弯察后面加上时间,可以参考下面的代码: @echo off d: for /l %%i in (1,1,%999999999%) do ( ping %1192.168.1.1 -n 1% && echo %% >>ping.txt date /t >>ping.txt time /t >>ping.txt ) pause 扩展资料: ping命令实现方式 ICMPPing ICMP是一种将差错与控制集于一体的协议,不仅用于传输差错报文,还毁茄用闹绝于消息控制报文。 TCPPing 在进行ICMPPing的时候,如果在目标主机的网络网关过滤了ICMP Ping包,ICMPPing的结果就不准确了。 UDPPing 在TCP/IP协议组中,用户数据报协议(UDP)提供应用进程之间数据报传送的基本机制。 参考资料来源:百度百科-ping (网络诊断工具)
网络命令ping命令不支持显示时间。我们打开cmd,通过ping --help可以查询ping命令的所有参数。 如果需要长ping,我们一般使用-t参数,如果限制烂衫ping的生存时间可以使用“-i 生存时间”具体使用如下: ping ip地址或谨历昌者域名-t-i (1-255)如果中断的话祥扒,使用ctrl+c
请输入 ping --help来查看弊嫌ping命令的租猜手所有参数,并没有你说的功兆和能,不过可以通过外部软件来实现。思路是返回值为空就是掉线的时间。
把厅物以下的代码保存成ping.bat你要查记录,哗伏闷到C:1.txt查看就行了del C:1.txtping 218.4.77.16 >c:乱弯1.txt:1timeping 218.4.77.16 >>c:1.txtgoto 1

如何在ping 命令结果前面加上时间日期
在ping 命令结果前面加上时间日期可以参考下面的代码::topecho %time%>>log.txtping -n 1 172.100.100.100 | findstr "TTL">> log.txtping -n 2 127.1 >nul扩展资料:ping命令常用参数-n count发送指定的数据包数,默认发送四个。-l size指定发送的数据包的大小,默认发送的数据包大小为32byte。-f 在数据包中设置“不分段”标记(仅适用于 IPv4),数据包就不会被路由上的网关分段。-i TTL将"生存时间"字段设置为TTL指定的值。-r count记录计数跃点的路由(仅适用于 IPv4),最多记录9个。参考资料来源:百度百科-ping (网络诊断工具)
:top echo %time%>>log.txtping -n 1 172.100.100.100 | findstr "TTL">> log.txtping -n 2 127.1 >nul goto top

本文由 在线网速测试 整理编辑,转载请注明出处。