首页
社区
课程
招聘
[求助]我想用批处理记录未PING通的时间·
发表于: 2009-4-20 23:25 2908

[求助]我想用批处理记录未PING通的时间·

2009-4-20 23:25
2908
类似于

D:\>ping 192.168.1.1 -t

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Request Timed Out         ----------------------------------------我想在文本中记录这个时间
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64

想用批处理记录这个未ping通的时间!

请大虾指教!

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
这个是我在网上找的 但是我就是不知道是怎么回事!

@echo off
:loop
ping -n 1 192.168.1.1 >>pingtime.log
ping -n 1 192.168.1.1|findstr /i /c:"Request timed out."
if %errorlevel%==0 (echo.>>pingtime.log&echo 时间:%date%_%time%,ping不通.>>pingtime.log)
goto loop

请大虾们看看是不是正确!  我用了 觉得不好!
2009-4-20 23:37
0
雪    币: 228
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
记录没PING的时间有什么用啊?,我觉得没必要吧
2009-4-24 19:33
0
游客
登录 | 注册 方可回帖
返回
//