今天晚上机房互联网出口的运营商做大规模网络割接,说是只会闪断两次,但是对他们还是不放心,也没精力一直守着看网络状态。
想着从外面租用的服务器用ping来监控闪断次数和持续时间,结果那破服务器装个xshell都卡成狗了~cmd的ping又默认不带时间戳,怎么办~
于是找了一段脚本,用来给windows cmd的ping加上时间戳,以便割接结束后核对具体的闪断情况。
首先创建一个pingtime.vbs文件,代码如下:
Dim args, flag, unsuccOut
args=""
otherout=""
flag=0
If WScript.Arguments.count = 0 Then
WScript.Echo "Usage: cscript tping.vbs [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]"
WScript.Echo " [-s count] [[-j host-list] | [-k host-list]]"
WScript.Echo " [-r count] [-w timeout] destination-list"
wscript.quit
End if
For i=0 to WScript.Arguments.count - 1
args=args & " " & WScript.Arguments(i)
Next
Set she