473,382 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
4 1775
One, but not definitive solution, is try to check that using threads. Are
you already tried that?

[]s
Cesar
"Terry Olsen" <to******@hotmail.com> escreveu na mensagem
news:%2****************@TK2MSFTNGP15.phx.gbl...
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.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #2
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
"Terry Olsen" <to******@hotmail.com> schreef in bericht
news:%2****************@TK2MSFTNGP15.phx.gbl...
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.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #3
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.
"m.posseth" <po*****@planet.nl> wrote in message
news:42***********************@nova.planet.nl...
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
"Terry Olsen" <to******@hotmail.com> schreef in bericht
news:%2****************@TK2MSFTNGP15.phx.gbl...
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.

*** Sent via Developersdex http://www.developersdex.com ***


Nov 21 '05 #4
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
"Terry Olsen" <to******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: markus | last post by:
Hi, As I been programming in C I have discovered more and more tools that really helps to speed up the development process when writing programs. Examples of such tools are cscope, cbrowser,...
6
by: DC | last post by:
Hi, I am programming a search catalogue with 200000 items (and growing). I am currently using the SQL Server 2000 fulltext engine for this task but it does not fit the requirements anymore. ...
6
by: G.Esmeijer | last post by:
Friends, I would like to read a text file (fixed length formaated) really fast and store the data into an Access database (2003). Using the streamreader and reading line by line, separating the...
0
by: James | last post by:
I have opened the ports I believe I require in order to play Links online. I can host a game, & then it plays perfectly. However, if I attempt to join a game, when the game loads I get the...
2
by: ABC | last post by:
I am always to write clases which has properties, is here any best tools or method let me typing properties codes more fast?
4
by: serge | last post by:
I managed to put together C# code and have it do the following: 1- Get all the table names that start with the letter "Z" from sysobjects of my SQL 2000 database and put these table names...
6
by: malcolm | last post by:
Hi, I would like help to get started on an idea. I have prior knowledge of how to do this so please be gentle with me as I am a complete beginner when it comes to ASP. I have a website...
6
by: test2000 | last post by:
Hello I'm trying to write a javascript that checks if a server/host is available. To be more precice. I would like to check if the browser can read an XML file from a server. If not the script...
17
by: Thomas Kowalski | last post by:
Hi, I would like to know whether someone knows a library or function that parses a string containing 3 double numbers in the form like xxxx.yyyyyyyyy xxxx.yyyyyyyyy xxxx.yyyyyyyyy really fast....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.