Last active
July 20, 2017 22:09
-
-
Save ficus/4b7c5fa96cb7e231c2fdeb89fcda0911 to your computer and use it in GitHub Desktop.
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 | |
# Simple script to test for network interruption blip we seem to experience for a moment btw. midnight and one. TNG 20170720 | |
# | |
# * 0-1 * * * /home/tgodar/tmp_net_test/netcheck.sh | while IFS= read -r line; do echo "$(date) $line"; done >>/home/tgodar/tmp_net_test/netcheck.log | |
# | |
if ping -c1 -w10 google.acom | grep -q '1 packets transmitted\, 1 received\, \0\% packet loss'; then | |
echo "Ping OK." | |
else | |
echo "Ping Failed!" | |
echo "A--" | |
ss -s | |
echo "B---" | |
netstat -s | |
echo "C----" | |
ss -l | |
echo "D-----" | |
ss -t -a | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment