Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 18th, 2005, 7:08 AM   #1
carmela
Newbie
 
Join Date: Jan 2005
Posts: 5
Rep Power: 0 carmela is on a distinguished road
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!
carmela is offline   Reply With Quote
Old Jan 18th, 2005, 7:41 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to 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
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jan 18th, 2005, 8:39 AM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,453
Rep Power: 7 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
the pseduocode above by Dizzutch is also how you can approach this problem in windows.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jan 18th, 2005, 8:43 AM   #4
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
i'm just not sure what the easiest/best language is, for windows
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jan 18th, 2005, 8:43 AM   #5
carmela
Newbie
 
Join Date: Jan 2005
Posts: 5
Rep Power: 0 carmela is on a distinguished road
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?
carmela is offline   Reply With Quote
Old Jan 18th, 2005, 8:45 AM   #6
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
sure, you could use Java
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jan 18th, 2005, 8:46 AM   #7
carmela
Newbie
 
Join Date: Jan 2005
Posts: 5
Rep Power: 0 carmela is on a distinguished road
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 is offline   Reply With Quote
Old Jan 18th, 2005, 8:48 AM   #8
carmela
Newbie
 
Join Date: Jan 2005
Posts: 5
Rep Power: 0 carmela is on a distinguished road
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
carmela is offline   Reply With Quote
Old Jan 18th, 2005, 8:50 AM   #9
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
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
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jan 18th, 2005, 8:51 AM   #10
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
you maybe could use a bat file for windows, but i could be wrong about that.

Welcome to the forums btw.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:00 AM.

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