Really fast method to check if host is online???

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

I have a list of pc names that I need to go out and pull information
from. If they are all online, great! But when a PC is turned off (not
online), the program hangs for a good 40 seconds before moving on. Is
there a way for me to quickly see if a host is online or not? I'm
hoping for something less than 5 seconds per host.
 
One, but not definitive solution, is try to check that using threads. Are
you already tried that?

[]s
Cesar


"Terry Olsen" <[email protected]> escreveu na mensagem
I have a list of pc names that I need to go out and pull information
from. If they are all online, great! But when a PC is turned off (not
online), the program hangs for a good 40 seconds before moving on. Is
there a way for me to quickly see if a host is online or not? I'm
hoping for something less than 5 seconds per host.
 
well i had a remoting project with exact the same problem , i solved this by
sending UDP broadcasts on the network to discover when a server starts \
stops
however this requires that on all computers a application is running that
sends these messages

regards

Michel Posseth
 
I got it down to a second or two per pc using a command line program called
"fping". I use the Process class to launch it invisibly and redirect its
output back to my app. It has switches that allow me to set the number of
ping requests (which I set to 1), and one that allows me to turn off all
messages except for the single ping result. I can also tell it how long to
wait for a reply (0-5 seconds) so I can tailor it to my network speed.
Unless I run across something better, this is what I'll use.
 
Could you not just send out a single "ping" to the pc to see if it's
online...? Should be reasonably quick with a fast timeout (I'm presuming
that the pc's are all on the local network)

Regards
Simon
 

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

Back
Top