473,563 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1793
One, but not definitive solution, is try to check that using threads. Are
you already tried that?

[]s
Cesar
"Terry Olsen" <to******@hotma il.com> escreveu na mensagem
news:%2******** ********@TK2MSF TNGP15.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******@hotma il.com> schreef in bericht
news:%2******** ********@TK2MSF TNGP15.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******@hotma il.com> schreef in bericht
news:%2******** ********@TK2MSF TNGP15.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******@hotma il.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
1978
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, tags, etc. There are ofcourse many different levels of programmers, and the beginners might only use emacs or vi to write their code. However, since...
6
3323
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. The products typically do have a verbose name, "canadian superapples: red tasty juicy macintosh apple from toronto" and the like. If a customer is...
6
23760
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 line into string just takes to long. When I Import the file with access manually goes fast. But how to use this fromout a C# programme who has...
0
875
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 annoying 'Connection Failed' message. Any suggestions as to where I should be looking? OS is WinXP
2
937
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
2183
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 inside an array variable. 2- Loop through each table name inside the array 1 to 1000 tables
6
1504
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 hosted by an internet host and want to add a PHPBB2 forum hosted on my own server. What I would like to introduce to my website is something like this
6
3663
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 should read the same XML file from a backup server. Does anyone have any idea how to achive that?? Any help is appreciated.
17
11290
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. Currently I am using "sscanf(line.c_str(), "%lf %lf %lf", &x, &y, &z);" which is kind of slow. Thanks in advance, Thomas Kowalski
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.