forking pings

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
penguinboy
Forum Contributor
Posts: 171
Joined: Thu Nov 07, 2002 11:25 am

forking pings

Post by penguinboy »

I have an idea for web app I'd like to make for myself, but I don't know how to go about doing it.

I have several hundred pieces of equipment (routers, bridges, dhcp servers, dns servers, webservers ... ect.).
Right now I use a win program called didyma http://www.xs4all.nl/~houtriet/ to moniter the equipment.
Basically the program pings the equipment, and lets me know if its up or down.
There are several problems I'm having with this though and I'd much rather make a web app with php that way I can make it do exactly what I want.
But I don't know how to get around a problem I'm having with pinging.

my problem is:
I have a list of several hundred ip's.
Right now to check them I have to ping one, then wait for it to respond (or not respond) then ping the next ... and the next... and so on.
This is very very slow if many of the ips are down.
So I'm looking for a way to fork the pings.
So that I could ping ips in groups or all at the same time or whatever, just so that I didn't have to wait for each one to respond.

instead of
ping -> wait for response -> ping -> wait for response -> ping -> wait for response


it would be
ping -> wait for response
ping -> wait for response
ping -> wait for response

with each ping running at the same time.



thanks for any help

--pb
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you might start a background process (or service on win32) to monitor the devices periodically and let this application write a status log file which you process via php.
Post Reply