Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   Programming question (http://www.programmingforums.org/showthread.php?t=1891)

carmela Jan 18th, 2005 7:08 AM

Programming question
 
To all hardcore programmers browsing this thread:

Hi! I want to create a program that measures "ping" response time. I want the program to detect a slowdown within a network (the response time generated by the "ping" command is higher than usual) and/or an intermittent network node (the "ping" generates a "request timed out").

What program can I use? If possible please include pseudocode/algorithm, syntax, or some good references or forums on the Web that can help me.

Thanks!

Dizzutch Jan 18th, 2005 7:41 AM

are you running linux or windows? if you're using linux you can best use perl or BASH scripting, and if you're using windows you'll have to ahng on till a windows programmer drops by. basic pseudocode would look like this.

:

while(pinging)
  parse output, determind TIME
  if TIME is less than LOWER_BOUND
    print that network is slow

i dunno something like that. you could also ping 5 times, and get an average and base it on that. TIME and LOWER_BOUND are variables.

good luck

Infinite Recursion Jan 18th, 2005 8:39 AM

the pseduocode above by Dizzutch is also how you can approach this problem in windows.

Dizzutch Jan 18th, 2005 8:43 AM

i'm just not sure what the easiest/best language is, for windows

carmela Jan 18th, 2005 8:43 AM

I'm running Windows.

Quote:

Originally Posted by Dizzutch
are you running linux or windows? if you're using linux you can best use perl or BASH scripting, and if you're using windows you'll have to ahng on till a windows programmer drops by. basic pseudocode would look like this.

:

while(pinging)
  parse output, determind TIME
  if TIME is less than LOWER_BOUND
    print that network is slow

i dunno something like that. you could also ping 5 times, and get an average and base it on that. TIME and LOWER_BOUND are variables.

good luck

I've read somewhere that Java can be used...is that true?

Dizzutch Jan 18th, 2005 8:45 AM

sure, you could use Java

carmela Jan 18th, 2005 8:46 AM

What are the possible languages that I can use? It might be fun trying out all of them. :)

Thanks for the replies. Keep them coming. :)


Quote:

Originally Posted by Dizzutch
i'm just not sure what the easiest/best language is, for windows


carmela Jan 18th, 2005 8:48 AM

Do you know the command/function that I can use? I'm not too familiar with Java.

Quote:

Originally Posted by Dizzutch
sure, you could use Java


Dizzutch Jan 18th, 2005 8:50 AM

well, you'll kinda need to learn how to program with Java first. here's sun's java tutorial

http://java.sun.com/docs/books/tutorial/

good luck

Dizz

Pizentios Jan 18th, 2005 8:51 AM

you maybe could use a bat file for windows, but i could be wrong about that.

Welcome to the forums btw.


All times are GMT -5. The time now is 4:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC