LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2010, 02:28 AM   #1
icygalz
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
Question average number of hosts that respond to pings during a traceroute


Hi,

I am a new learner. I need a simple scripts that compute the average ping time for hosts, and the average number of hosts that respond to pings during a traceroute.

I have finished the ping part but I confused how to start the traceroute part

Code:
#!/bin/bash
#!/bin/sh

txt=$*
count=0;
for host in $txt; do
echo $host
echo $( ping -c 3 $host | grep avg | sed 's@.*=@ rrt ave =@' | sed -r 's@ = [^/]+/([^/]+).*@= \1 ms@')
done;
Can anyone help me where I need to start?

Thanks,

icy
 
Old 02-27-2010, 04:21 AM   #2
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Perhaps you may get more help by having this put into a more relevant part of the forum.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
local pings/apache2 sites work from outside. external pings/apt-get not working. BnrStnr Linux - Networking 5 02-25-2010 03:20 PM
network connections suddenly slow to respond (ssh, mythtv) except pings are instant joe_259 Linux - Networking 1 10-19-2008 09:36 PM
Linux - Determine number of unique hosts connected to server linux_linux Linux - Networking 2 03-15-2008 10:41 PM
limit number of hosts behind Proxy anoopshukla Linux - Networking 0 02-04-2005 05:32 AM
Practical limit to the number of hosts on Apache? JimBass Linux - Newbie 3 11-09-2004 10:46 PM


All times are GMT -5. The time now is 08:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration