473,395 Members | 1,689 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,395 software developers and data experts.

Recreating Ping in .Net Problems

I have downloaded every example on how to create a ping utility in .Net in
both VB and C#, but have been disappointed with the results. I have YET to
find an example that returns consistent results that are even close the the
actual ping command line utility. For example:

If i would ping the same server over and over, some pings would come back in
0 milliseconds, others would come back in 15, but never in between. It would
always jump between the two. The real ping utility would consitently return
in 5-6ms for the same host but I could never get that kind of precision or
consistency. What does the real ping utility do different to get those kind
of results?

Any thoughts?

Here are some of my sources:
http://support.microsoft.com/default...b;en-us;828993
http://www.eggheadcafe.com/articles/20020209.asp
http://www.c-sharpcorner.com/network/ping.asp
http://www.csharphelp.com/archives/archive6.html
http://www.ftponline.com/vsm/2002_03.../qa/page2.aspx
http://www.mastercsharp.com/article....59&&TopicID=14
Jul 21 '05 #1
3 2223
Well, you could always use the commandline ping, hack that this idea is..

exec master..xp_cmdshell 'ping www.server.com'

or shell ping www.server.com > out.txt

"Jason Rodman" <Jason Ro****@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...
I have downloaded every example on how to create a ping utility in .Net in
both VB and C#, but have been disappointed with the results. I have YET to
find an example that returns consistent results that are even close the the actual ping command line utility. For example:

If i would ping the same server over and over, some pings would come back in 0 milliseconds, others would come back in 15, but never in between. It would always jump between the two. The real ping utility would consitently return in 5-6ms for the same host but I could never get that kind of precision or
consistency. What does the real ping utility do different to get those kind of results?

Any thoughts?

Here are some of my sources:
http://support.microsoft.com/default...b;en-us;828993
http://www.eggheadcafe.com/articles/20020209.asp
http://www.c-sharpcorner.com/network/ping.asp
http://www.csharphelp.com/archives/archive6.html
http://www.ftponline.com/vsm/2002_03.../qa/page2.aspx
http://www.mastercsharp.com/article....59&&TopicID=14

Jul 21 '05 #2
Jason,
I went through this mess recently. Send me your email address and I'll send
you some code. It may be what you already have but it's worth a look.
-Mike

"Jason Rodman" wrote:
I have downloaded every example on how to create a ping utility in .Net in
both VB and C#, but have been disappointed with the results. I have YET to
find an example that returns consistent results that are even close the the
actual ping command line utility. For example:

If i would ping the same server over and over, some pings would come back in
0 milliseconds, others would come back in 15, but never in between. It would
always jump between the two. The real ping utility would consitently return
in 5-6ms for the same host but I could never get that kind of precision or
consistency. What does the real ping utility do different to get those kind
of results?

Any thoughts?

Here are some of my sources:
http://support.microsoft.com/default...b;en-us;828993
http://www.eggheadcafe.com/articles/20020209.asp
http://www.c-sharpcorner.com/network/ping.asp
http://www.csharphelp.com/archives/archive6.html
http://www.ftponline.com/vsm/2002_03.../qa/page2.aspx
http://www.mastercsharp.com/article....59&&TopicID=14

Jul 21 '05 #3
Dan
I recall trying out an open source ICMP implementation done using C# and it
seemed nice and quite stable.

http://freshmeat.net/projects/icmplibrary/

Hope this helps,
Dan

"Jason Rodman" wrote:
I have downloaded every example on how to create a ping utility in .Net in
both VB and C#, but have been disappointed with the results. I have YET to
find an example that returns consistent results that are even close the the
actual ping command line utility. For example:

If i would ping the same server over and over, some pings would come back in
0 milliseconds, others would come back in 15, but never in between. It would
always jump between the two. The real ping utility would consitently return
in 5-6ms for the same host but I could never get that kind of precision or
consistency. What does the real ping utility do different to get those kind
of results?

Any thoughts?

Here are some of my sources:
http://support.microsoft.com/default...b;en-us;828993
http://www.eggheadcafe.com/articles/20020209.asp
http://www.c-sharpcorner.com/network/ping.asp
http://www.csharphelp.com/archives/archive6.html
http://www.ftponline.com/vsm/2002_03.../qa/page2.aspx
http://www.mastercsharp.com/article....59&&TopicID=14

Jul 21 '05 #4

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

Similar topics

0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
7
by: luvwknd | last post by:
Hi all, I am attempting to utilize MS's article I.D. #828993 found at: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B828993 In an effort to create a GUI Ping utility that...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
1
by: Krish | last post by:
All, I have an offline application that works online for some data syncronization. For data syncronization I access a webservice. I want to show whether my application is online or not by checking...
3
by: amaccormack | last post by:
I wrote a quick script to check the "up-ness" of a list of machines, and timeout after 1 second. However, with a lot of timeouts, the script takes a logn time, so I thought to parallelise it....
2
by: adnanahmed714 | last post by:
hi 1) i am using a home network consisting of two computer.on One pc i have Marvell Lan card(built-in on the board) and on the second pc i have BayLan network adapter. What i know if two pc's...
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
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: 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...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.