Advice on automating mass pings and retrieving the summary times from each ping


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Advice on automating mass pings and retrieving the summary times from each ping
# 1  
Old 04-27-2011
Advice on automating mass pings and retrieving the summary times from each ping

Hi guys,

Bit of a Unix amateur here! Smilie

As part of some research I'm doing I am looking into performance differences between IPv4 and IPv6, and have a list of IPv6 accessible websites and their respective v4 and v6 addresses.

I'm looking to do a ping to each one and record, for each domain, the v4 response summary times, and the v6 response summary times.

I've got all the IP addresses ready to grab from a Perl script which is pulling them from a database, and I can output them in the below fashion, as an example:

Code:
ping -c 4 <domain1v4addr>
ping6 -c 4 <domain1v6addr>
ping -c 4 <domain2v4addr>
ping6 -c 4 <domain2v6addr>
...

I've done some messing around and piped that through to sh and then grep'd to the summary lines and awk'd to the summary times (is this the most efficient way of doing it?) Only problem is that once a ping fails for an address, it doesn't produce a summary line with average times and my method kind of falls over.

The intention is to get the times and output them to a text file so I can import back into the database for further analysis, so the time values for the v4 and v6 addresses need to stay with the 'parent' domain, even if they fail.

Hopefully this sort of makes sense?! I've been scratching my head for hours now as to how to go about doing it but I've hit a bit of a wall. Any ideas?! Thanks!
# 2  
Old 04-28-2011
Came up with a rough solution. I called the pings from the Perl script itself and captured the output into a text file, and now will just grep and awk through that and import the useful stuff into database.

</thread>
# 3  
Old 05-09-2011
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Programming

Ping test sends mail when ping fails

help with bash script! im am working on this script to make sure my server will stay online, so i made this script.. HOSTS="192.168.138.155" COUNT=4 pingtest(){ for myhost in "$@" do ping -c "$COUNT" "$myhost" &&return 1 done return 0 } if pingtest $HOSTS #100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies

2. IP Networking

Default/saved-telemetry-pings

Off the record, I would like to know if someone can explain me about /usr/home/user-name/.mozilla/firefox/caiw5bkm.default/saved-telemetry-pings A folder which is full of alpha-numerical rows of pings. Some example given here 1b6d8637-902d-47da-b4e8-6a4e012ae7f3... (2 Replies)
Discussion started by: 1in10
2 Replies

3. Shell Programming and Scripting

How to extract info from pings.?

Hi guys, new to this forum. I am currently trying to extract the times from pinging a domain and list the top 3 and then also do the opposite i.e. list the bottom 3. so if I had this as a ping result (the bold part is what I want): 64 bytes from 193.120.166.90: icmp_seq=10 ttl=128 time=34.8... (5 Replies)
Discussion started by: acoding
5 Replies

4. Programming

Problem with implementing the times() function in C (struct tms times return zero/negative values)

Hello, i'm trying to implement the times() function and i'm programming in C. I'm using the "struct tms" structure which consists of the fields: The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process. The tms_stime structure... (1 Reply)
Discussion started by: g_p
1 Replies

5. AIX

how would you know your server was rebooted 3 times or 5 times

Is there such location or command to know how many times did you reboot your server in that particular day?in AIX. (3 Replies)
Discussion started by: kenshinhimura
3 Replies

6. AIX

VI questions : mass changes, mass delete and external insert

Is it possible in VI to do a global change but take the search patterns and the replacement patterns from an external file ? I have cases where I can have 100,200 or 300+ global changes to do. All the new records are inside a file and I must VI a work file to change all of them. Also, can... (1 Reply)
Discussion started by: Browser_ice
1 Replies

7. Shell Programming and Scripting

Automating Rlogin and File Retrieving

Hi, I'm a begginer in Unix Scripting and i'm trying to write a script that performs this functions.. 1. Rlogin to a system 2. Copy a Perl script inTO the system 3. Run the Perl Script 4. Retrieve the result(file) of the Perl Script 5. Copy the result file to a single system 6. Logout of... (3 Replies)
Discussion started by: vicesjr
3 Replies
Login or Register to Ask a Question