Code Comments
Programming Forum and web based access to our favorite programming groups.[sorry for the double post in vb.misc...] I wanted to make a program that monitors hosts, to see that they are up. I want to make the part of the program that does the testing in either Perl,Pascal, or maybe VB. One of the GUI's is going to be in vb, but I would prefer to have the part the does the polling on a unix system, Preferably perl. But I will setting for any of the above 3 langs. I want to be able to poll the hosts every 5 minutes. So i figured I would send a really small 1 packet ping to each host every 2 mins. Lets say I have a list of 255 hosts to ping ( I would like the timeout for a ping to be 4 seconds). If it stalls on 50 hosts, that means 200 wasted seconds. Further more, it means that now took up the time for 2 or more polls. What is the most efficient way to do this? I was originally thinking that I would have to make it ping multiple hosts at the same time, maybe like 10. I just have no idea how to do that. My other idea is to have multiple instances running. All the data is held in a database. So if I see that there are 255 hosts, I can spawn 12 instances of the program, each one monitoring 20 hosts.. Any other ideas.. Right now i just want to monitor icmp, but later on i want to monitor http as well. Thanks.
Post Follow-up to this message"d0x" <dan@no.spam> wrote in message news:pan.2004.08.21.23.09.56.577265@no.spam... > > I want to be able to poll > the hosts every 5 minutes. So i figured I would send a really small 1 > packet ping to each host every 2 mins. Lets say I have a list of 255 hosts > to ping ( I would like the timeout for a ping to be 4 seconds). If it > stalls on 50 hosts, that means 200 wasted seconds. Further more, it means > that now took up the time for 2 or more polls. What is the most efficient > way to do this? I was originally thinking that I would have to make it > ping multiple hosts at the same time, maybe like 10. I just have no idea > how to do that. I was thinking about how to do this for an application that I am writing the other day. So far the best solution I have come up with is to simply fork execution for each ping or other tcp/ip request. > My other idea is to have multiple instances running. All the data is held > in a database. So if I see that there are 255 hosts, I can spawn 12 > instances of the program, each one monitoring 20 hosts.. This is pretty much the same result as forking above (at least for practical purposes). Except that if you use fork you can handle the multiple instances within the program itself. That said, I have only just started thinking about this a couple of days ago myself and have not even tried to implement anything yet as I am currently working on another project. So it is possible that I am completely wrong - no doubt I will know in a few days when I get around to implementing it :P. Andrew Bryson http://www.bryson.co.nz
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.