找回密码
 立即注册
邮电通讯系统 2022-08-16 43 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
批管理bat命令ping将成果加时刻戳后保留,ping不通的独自保留到timeout文件办公中管理网络时断时续故障时,常用方法是长ping方案IP地址,记录ping成果到文件,查找中止时刻的规则,再进一步分析因素。系统自带的ping明显无法满意。小弟在百度搜来代码加以修正,能够终结以下需求:1、自定义输入要ping的方案主机IP地址2、批管理bat命令长ping方案主机IP地址,并即将成果逐行加上时刻戳,输出到文件-gt;方案主机IP地址.log3、如果ping不通,将成果加上时刻戳,独自输出到文件-gt;timeout_方案主机IP地址.log例如ping192.168.1.1:2017-02-08周三12:00:07来自192.168.1.1的回复:字节=32时刻lt;1msTTL=1282017/02/08周三11:48:05恳求超时。2017/02/08周三11:48:10来自192.168.1.5的回复:无法访问方案主机。2017-02-08周三12:00:09PING:传输失败。常见故障。注意,本bat脚本在win10/win7操作系统使用。如果是较早版本操作系统,需求的兄弟能够自个测试自个再进一步修正使用。本资料共包括以下附件:
批管理bat命令ping将成果加时刻戳后保留,ping不通的独自保留到timeout文件.bat

(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)

[下载]19141869551.rar




上一篇:双网卡如何同时上内外网
下一篇:信息安全风险评估服务技术白皮书