Last active
November 7, 2017 23:23
-
-
Save lyndell/21d7ada9774784b03da1 to your computer and use it in GitHub Desktop.
Monitor network, gathering ping and HTTP headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Name: pingtimer.sh | |
# Desc: Monitor network, gathering ping and HTTP headers | |
# URL: https://gist.github.com/lyndell/21d7ada9774784b03da1 | |
# | |
# Author: Lyndell Rottmann | |
# WWW: http://Lyndell.US | |
# Copyright (c) 2015 Lyndell Rottmann | |
# | |
# Debug mode on/off: (default off) | |
set +x | |
if [ $1 ]; then | |
TESTIP=${1} | |
else | |
TESTIP="www.Lyndell.NET" | |
fi | |
function quit () | |
{ | |
echo -e "\n*** Exiting by user keystroke ***\n" | |
exit $? | |
} | |
# trap keyboard interrupt (control-c) | |
trap quit SIGINT | |
echo -e "\n*** Press ctrol+c to quit. ***\n\n" | |
while true | |
do | |
date | |
ping -i 20 -c 10 ${TESTIP} | |
echo "" | |
traceroute -n -I ${TESTIP} | |
echo "" | |
curl -I http://${TESTIP} | |
echo "" | |
echo "" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment