标题: 求用ping检测是否掉包!
[打印本页]
作者: lotsunhim
时间: 2007-2-25 23:53
标题: 求用ping检测是否掉包!
ping网关是否掉包并记录掉包时间和日期?
p处理应该怎么写啊?
:1st
ping 192.168.0.1 -t|find /i "Request timed out">>chk2.log
if %errorlevel%==0 goto :1st
我这样写了一个,但记录不了掉包时间啊。
[
Last edited by lotsunhim on 2007-2-26 at 01:29 AM ]
作者: lxmxn
时间: 2007-2-26 00:21
ping 192.168.0.1|find /i "Request timed out" >>chk2.log&&echo %time% >>chk2.log
作者: lotsunhim
时间: 2007-2-26 00:30
这样不行啊,只记录"Request timed out"时间并没有记录啊。
作者: lotsunhim
时间: 2007-2-26 00:30
&&echo %time% >>chk2.log
这个不起作用了。