Doing 40 differnt things at once

C

colin.steadman

I'm building a statistics page and would like to ping a server and show
the result in ASP. This shouldn't be a problem, but I'd like to be
able to get the same information for 40 other servers all at the same
time.

The only solution I can think of would be to put the list of servers
into an array and loop through it. But this approach would take
seconds to process each server and therefore the entire page would take
an age to load.

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds? I've never done
anything like this before so I have no idea where to start.
Any suggests or comments would be greatly appreciated.

TIA,

Colin
 
S

Steven Burn

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds?

Probably not (best people to ask would be Aaron Bertrand, Ray Constanzo or
Bob Barrows)

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
B

Bob Barrows [MVP]

I'm building a statistics page and would like to ping a server and
show the result in ASP. This shouldn't be a problem, but I'd like to
be able to get the same information for 40 other servers all at the
same time.

The only solution I can think of would be to put the list of servers
into an array and loop through it. But this approach would take
seconds to process each server and therefore the entire page would
take an age to load.

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds? I've never done
anything like this before so I have no idea where to start.
Any suggests or comments would be greatly appreciated.

TIA,

Colin


I suspect you will need to find a third-party component capable of doing
asynchronous pings (I'm not sure such a beast even exists - maybe you should
ask on .iis or .asp.components). I know this is not possible using asp by
itself.

Bob Barrows
 
C

Chris Hohmann

I'm building a statistics page and would like to ping a server and show
the result in ASP. This shouldn't be a problem, but I'd like to be
able to get the same information for 40 other servers all at the same
time.

The only solution I can think of would be to put the list of servers
into an array and loop through it. But this approach would take
seconds to process each server and therefore the entire page would take
an age to load.

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds? I've never done
anything like this before so I have no idea where to start.
Any suggests or comments would be greatly appreciated.

TIA,

Colin
What kind of response times are you getting from your servers. I did a proof
of concept against google.com and it took approximately 7 seconds with and
average response time of about 85ms. Here's the code:

<%
Dim start : start = Timer
Dim shell, exec, i
Response.Write "<pre>"
Set shell = CreateObject("WScript.Shell")
For i = 0 To 39
Set exec = shell.Exec("ping google.com -n 1")
Response.Write exec.StdOut.ReadAll()
Next
Set exec = Nothing
Set shell = Nothing
Response.Write "</pre>"
Response.Write Timer - start
%>
 
R

Rob Meade

Is there any way ASP can ping all the server at the same time so that
the results for all server could be seen in seconds? I've never done
anything like this before so I have no idea where to start.
Any suggests or comments would be greatly appreciated.

Slightly different approach perhaps and it relies on SQL Server if you have
it...but you *could*.... have SQL Server ping the servers and record the
results to a table, run this in a job at what ever frequency you wanted, per
minute, per hour etc, then in the ASP just dump the table results to the
page - you could add a feature to the page enabling a user to get a 'real
time' result but warn them it might take longer to load...

Just a suggestion

Regards

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top