找回密码
 立即注册
搜索
查看: 2385|回复: 10

[网络] windows下有没有定时ping某个ip的命令

[复制链接]
     
发表于 2022-8-25 09:26 | 显示全部楼层 |阅读模式
用ping -t xxx的话,频率太快,
有没有每60秒ping一次,终止后显示百分比的命令
回复

使用道具 举报

发表于 2022-8-25 09:34 | 显示全部楼层
写一个bat用循环
回复

使用道具 举报

     
发表于 2022-8-25 09:49 | 显示全部楼层
pinginfoview
回复

使用道具 举报

     
发表于 2022-8-25 13:35 | 显示全部楼层
https://www.elifulkerson.com/projects/tcping.php

但是不能icmp,只能tcp+端口

tcping -t -i 3 www.baidu.com

** Pinging continuously.  Press control-c to stop **

Probing 163.177.151.110:80/tcp - Port is open - time=41.566ms
Probing 163.177.151.110:80/tcp - Port is open - time=43.753ms
Control-C

Ping statistics for 163.177.151.110:80
     2 probes sent.
     2 successful, 0 failed.  (0.00% fail)
Approximate trip times in milli-seconds:
     Minimum = 41.566ms, Maximum = 43.753ms, Average = 42.660ms
回复

使用道具 举报

     
发表于 2022-8-25 15:17 | 显示全部楼层
如果只想用windows自身组件实现

写个后台运行的bat,ping的参数设置好,并且持续写入指定文件。
自己搜一下,几行代码的事。
然后windows自带计划任务,设定好时间和触发器即可。
回复

使用道具 举报

     
发表于 2022-8-25 15:31 | 显示全部楼层
装个 WSL, 用 Linux 下的 ping, 支持 -i 参数
回复

使用道具 举报

     
 楼主| 发表于 2022-8-25 15:58 | 显示全部楼层
litel 发表于 2022-8-25 13:35
https://www.elifulkerson.com/projects/tcping.php

但是不能icmp,只能tcp+端口

感谢大佬,这个好用,其实我电脑上有tcping,但是原来不知道可以加 i 参数。
回复

使用道具 举报

     
发表于 2022-8-25 16:18 | 显示全部楼层
bat写入结果到TXT,然后用计划任务run
回复

使用道具 举报

头像被屏蔽
     
发表于 2022-8-25 16:20 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

     
发表于 2022-8-26 00:31 | 显示全部楼层
PowerShell的

如果有次数限制,可以用这个(以5次为例):
  1. $Results = Test-Connection -TargetName "baidu.com" -Delay 60 -Count 5
复制代码

如果要不断循环,可以用这个
  1. Test-Connection -TargetName "baidu.com" -Delay 60 -Repeat | ForEach-Object -Begin { $Results = @() } -Process { $Results += $_ }
复制代码
什么时候不测了就按Ctrl+C中断。

最后跑这个算百分比:
  1. $Results.Status.Where({$_ -eq 'Success'}).Count / $Results.Count
复制代码
回复

使用道具 举报

     
发表于 2022-8-26 04:24 | 显示全部楼层
如果能用第三方软件的话 有一个老软件叫ATKKPING 你要的功能都有
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|上海互联网违法和不良信息举报中心|网上有害信息举报专区|962110 反电信诈骗|举报电话 021-62035905|Stage1st ( 沪ICP备13020230号-1|沪公网安备 31010702007642号 )

GMT+8, 2024-9-22 11:38 , Processed in 0.043530 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表