By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,069 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Recreating Ping in .Net Problems

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.