ping包,支持ip录入

@echo off

::等待用户输入需要监控IP
set /p ip=Input the IP required to monitor:
echo executing......
:start
echo|set /p ="!"

::将时间插入到日志文件
echo %date% %time% >>%ip%_log.txt
::findstr "Reply Request", 服务器端
::find "来自", PC机端

::测试结果插入到日志文件
ping -n 1 %ip% | find "来自" >>%ip%_log.txt

::调节结果输出的频率
ping 127.0.0.1 -n 4 >nul
goto start
pause

原文地址:https://www.cnblogs.com/0-0snail/p/9809360.html