Ping 5000 IP's at the same time? Multi thread?

gwinetworks

New member
Joined
Sep 28, 2011
Messages
2
Location
United States
Programming Experience
1-3
Hello all,

I am working on a service for monitoring our network (company too cheap to buy software)

Anywho, I can get the pings to run through, but takes a long time as it waits for each ping to complete before sending the next ping.

[XCODE] Whilerdr.Read

pingInfo.strLocation = rdr(
"txtLocation").ToString
pingInfo.strHost = rdr(
"txtHost").ToString
pingInfo.strIP = rdr(
"txtIPAddress").ToString()
sendPing(pingInfo)
End While
[/XCODE]

Anythoughts on how to fire these all at the same time? I tried a threadpool and tpool.queworkeritem, but then it didn't update the pinginfo for each and I got 300 responses from the first location in my list.
 
Create a class , create some threads and then in each thread do a section of the 5000? so if you have 5 threads, 1000 pings in each, then set the ping requests to just 1 ping and wait no longer than 250ms? (if possible... depending on infrastructure)

Just a thought anyway!
 
Back
Top