我尝试ping for循环,但它非常慢: ping = subprocess.Popen(["ping", host], stdout = subprocess.PIPE, stderr = subprocess.PIPE) print out #This will show me theping result, I can check the content
我想写一个简单的.bat文件,它将依次ping多个IP地址(以确认服务器是否在线),而不必每次都键入"ping server name“所以我想要的是
Ping 10.X.X.1等待10秒(或显示标准4 ping响应所需的时间) Ping 10.X.X.2等待10秒(或显示标准4 ping响应所需的时间) Pi