Skip to content

Instantly share code, notes, and snippets.

@filipenf
Created July 13, 2016 22:06
Show Gist options
  • Save filipenf/48a988a13a12a836ee746817a2321642 to your computer and use it in GitHub Desktop.
Save filipenf/48a988a13a12a836ee746817a2321642 to your computer and use it in GitHub Desktop.
infinite loop to test network with fping and mtr
#!/bin/bash
if [ -z $1 ]; then
echo "Usage: $0 <ip address>"
exit 1;
fi;
IP_ADDR=$1
while true; do
mtr --report -c 30 --no-dns $IP_ADDR >> mttr-report 2>&1 ;
fping -c 30 $IP_ADDR >> fping-report 2>&1 ;
sleep 60;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment