Server latency
Posted 10-27-2011 at 08:26 AM by sag47
Tags networking, ping
I wanted a quick and dirty way to determine server latency on my Kubuntu machine. This just parses simple output from ping and provides only the time values.
Output
You can put as many servers or IPs as you want in the for loop to get a comparison. Just simple little interesting statistic.
SAM
Code:
for x in drexel.edu google.com;do echo -n "[$x]: "; ping -c 1 $x | head -n 2 | tail -n 1 | awk '{split($8,arr,"=")} END{print arr[2],$9}';done
Code:
[drexel.edu]: 0.576 ms [google.com]: 6.23 ms
SAM
Total Comments 0