What's the best way to ping many network devices in parallel?

后端 未结 6 2099
鱼传尺愫
鱼传尺愫 2021-02-09 09:36

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 pollin

6条回答
  •  情书的邮戳
    2021-02-09 10:38

    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.

提交回复
热议问题