(The batch management bat command ping adds the time stamp to the result and keeps it. If the ping fails, it is kept to the timeout file. In the office, when the management network fails intermittently, the common method is to ping the IP address of the scheme for a long time, record the ping result to the file, and find the stop time. rules, and further analyze the factors. The ping that comes with the system is obviously unsatisfactory. The little brother has corrected the code in Baidu search, which can solve the following requirements: 1. Customize the IP address of the program host to be pinged; 2. Batch management bat command long ping the program host IP address, and add a timestamp line by line to the result, and output Go to the file -gt; the IP address of the program host.log3. If the ping fails, add a timestamp to the result and output it to the file -gt;timeout_IP address of the program host.log, for example, ping192.168.1.1:2017-02-08 Wed 12:00:07 Reply from 192.168.1.1: bytes=32 time lt; 1msTTL=128 2017/02/08 Wed 11:48:05 Request timeout. 2017/02/08 Wed 11:48:10 Reply from 192.168.1.5: Unable to access scheme host. 2017-02-08 Wed 12:00:09 PING: Transfer failed. Common malfunctions. Note that this bat script is used in win10/win7 operating systems. If it is an earlier version of the operating system, the brothers who need it can test it by themselves and then make further corrections. This document includes the following attachments:
The batch management bat command ping will save the results after adding time stamps, and those that cannot be pinged will be saved to the timeout file.bat)