平行ping多个网络设备的最佳方法是什么? [英] What's the best way to ping many network devices in parallel?

查看:281
本文介绍了平行ping多个网络设备的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过迭代ping来调查网络中的大量设备(超过300个)。



该程序依次轮询设备,因此速度很慢。
我想提高轮询的速度。



在Delphi 7中有一些方法可以实现:


  1. 每个设备都有一个线程做ping。

  2. 学习并使用Indy 10.需要的例子。

  3. 使用基于窗口消息的重叠I / O。

  4. 根据事件使用完成端口。

什么是更快,更容易?请提供一些例子或链接。

解决方案

使用ICMP泛滥网络不是一个好主意。

您可能需要考虑某种线程池并排队Ping请求,并有一定数量的线程执行请求。


I poll a lot of devices in network (more than 300) by iterative ping.

The program polls the devices sequentially, so it's slow. I'd like to enhance the speed of polling.

There some ways to do this in Delphi 7:

  1. Each device has a thread doing ping. Manage threads manually.
  2. Learn and use Indy 10. Need examples.
  3. Use overlapped I/O based on window messages.
  4. Use completion ports based on events.

What is faster, easier? Please, provide some examples or links for example.

解决方案

Flooding the network with ICMP is not a good idea.

You might want to consider some kind of thread pool and queue up the ping requests and have a fixed number of threads doing the requests.

这篇关于平行ping多个网络设备的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆