Doing 40 differnt things at once

Discussion in 'ASP General' started by colin.steadman@gmail.com, Jan 13, 2005.

  1. Guest

    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
     
    , Jan 13, 2005
    #1
    1. Advertising

  2. Steven Burn Guest

    > 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!

    <> wrote in message
    news:...
    > 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
    >
     
    Steven Burn, Jan 13, 2005
    #2
    1. Advertising

  3. wrote:
    > 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
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 13, 2005
    #3
  4. Guest

    OK thanks Bob, I thought as much!
     
    , Jan 13, 2005
    #4
  5. <> wrote in message
    news:...
    > 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
    %>
     
    Chris Hohmann, Jan 13, 2005
    #5
  6. Rob Meade Guest

    <> wrote...

    > 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
     
    Rob Meade, Jan 15, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Galsaba
    Replies:
    6
    Views:
    355
    Galsaba
    Apr 17, 2004
  2. =?Utf-8?B?QWxwaGFRdXAybml0ZQ==?=

    How to allow access to HD that was used with a differnt computer

    =?Utf-8?B?QWxwaGFRdXAybml0ZQ==?=, Nov 3, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    358
    =?Utf-8?B?TGVvbiBNYXluZQ==?=
    Nov 6, 2006
  3. =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=

    vs2005 publish website doing bad things, bad things

    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Oct 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    604
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 25, 2006
  4. Tamer Ibrahim
    Replies:
    1
    Views:
    579
    JIGNESH
    Jan 17, 2008
  5. merfh3
    Replies:
    0
    Views:
    252
    merfh3
    Feb 1, 2011
Loading...

Share This Page