LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 01: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, 03: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



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 02:20 PM
network connections suddenly slow to respond (ssh, mythtv) except pings are instant joe_259 Linux - Networking 1 10-19-2008 08:36 PM
Linux - Determine number of unique hosts connected to server linux_linux Linux - Networking 2 03-15-2008 09:41 PM
limit number of hosts behind Proxy anoopshukla Linux - Networking 0 02-04-2005 04:32 AM
Practical limit to the number of hosts on Apache? JimBass Linux - Newbie 3 11-09-2004 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:12 AM.

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
Open Source Consulting | Domain Registration