weblog d’un abbe

20080516

Wanna measure latencies to different servers via ICMP

Filed under: Fun, Hacking — Tags: , , , , — abbe @ 0130
abbe@chateau ~/bin $ cat measure-latencies.sh
#!/bin/sh
# Author: Ashish Shukla 

SIXXS_SERVERS="nlams01 iedub01 nlams04 simbx01 deham01 bebru01 ptlis01 sesto01 noosl01 usewr01 usqas01 usbos01 gblon02 plwaw01 uschi02 chzrh01 dedus01"

for server in ${SIXXS_SERVERS}; do
	echo ${server}.sixxs.net = `ping -n -c4 ${server}.sixxs.net 2>/dev/null |awk '/^rtt min/ { print $4 }' |awk -F/ '{ print $2 }'`ms
done
abbe@chateau ~/bin $ ./measure-latencies.sh 
nlams01.sixxs.net = 353.104ms
iedub01.sixxs.net = 327.646ms
nlams04.sixxs.net = 483.722ms
simbx01.sixxs.net = 279.078ms
deham01.sixxs.net = 358.541ms
bebru01.sixxs.net = 347.362ms
ptlis01.sixxs.net = 346.989ms
sesto01.sixxs.net = 331.026ms
noosl01.sixxs.net = 346.034ms
usewr01.sixxs.net = 349.687ms
usqas01.sixxs.net = 345.009ms
usbos01.sixxs.net = 315.370ms
gblon02.sixxs.net = 359.834ms
plwaw01.sixxs.net = 352.248ms
uschi02.sixxs.net = 361.986ms
chzrh01.sixxs.net = 448.864ms
dedus01.sixxs.net = 321.748ms

I’ve hacked above bash script to measure latencies between my box and SiXXS PoPs. Hope this useful to you while deciding which PoP to use. Anyways, happy IPv6ing…:)

About these ads

2 Comments »

  1. How did you learn bash scripting & awk without forgetting it? Do you leanr by solving problems or by reading books?

    Comment by Edwin Jose Palathinkal — 20080516 @ 1524

  2. Scripting is not about writing scripts in files. I only store them in files, when I think its worth storing. Anyways, I think it is easy:

    1. RTFM. /me wishes if wikipedia is accessible via ‘man’ and ‘info’ :P .
    2. Script even smaller tasks, which you don’t find worth scripting :P. And be careful with your scripts ;).
    3. Use FOSS stack (including OS :P) , which always inspires you to do something creative and ofcourse free :).

    Happy Scripting…

    Comment by आशीष शुक्ल — 20080516 @ 1534


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: