Created
June 20, 2018 19:22
-
-
Save cbdelavenne/c936ea96c9f77b4eca5da19f95445a4c to your computer and use it in GitHub Desktop.
LiveChat Network Diagnostics (Linux/Ubuntu)
This file contains hidden or 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
#!/usr/bin/env bash | |
echo "Step 1 - Created directories to store diag results..." | |
mkdir -p ./lc-diag/ping | |
mkdir -p ./lc-diag/traceroute | |
mkdir -p ./lc-diag/host | |
echo "Step 1 - DONE!" | |
echo "========================" | |
echo "Step 2 - Running and storing ping command results..." | |
ping -c 200 my.livechatinc.com > ./lc-diag/ping/ping-my.log | |
ping -c 200 cdn.livechatinc.com > ./lc-diag/ping/ping-cdn.log | |
ping -c 200 secure.livechatinc.com > ./lc-diag/ping/ping-secure.log | |
ping -c 200 gateway.livechatinc.com > ./lc-diag/ping/ping-gateway.log | |
ping -c 200 api.livechatinc.com > ./lc-diag/ping/ping-api.log | |
echo "Step 1 - DONE!" | |
echo "========================" | |
echo "Step 2 - Running and storing traceroute command results..." | |
`traceroute my.livechatinc.com > ./lc-diag/traceroute/traceroute-my.log` | |
`traceroute cdn.livechatinc.com > ./lc-diag/traceroute/traceroute-cdn.log` | |
`traceroute secure.livechatinc.com > ./lc-diag/traceroute/traceroute-secure.log` | |
`traceroute secure-lc.livechatinc.com > ./lc-diag/traceroute/traceroute-secure-lc.log` | |
`traceroute gateway.livechatinc.com > ./lc-diag/traceroute/traceroute-gateway.log` | |
`traceroute api.livechatinc.com > ./lc-diag/traceroute/traceroute-api.log` | |
echo "Step 2 - DONE!" | |
echo "========================" | |
echo "Step 3 - Running and storing host command results..." | |
`host my.livechatinc.com > ./lc-diag/host/host-my.log` | |
`host cdn.livechatinc.com > ./lc-diag/host/host-cdn.log` | |
`host secure.livechatinc.com > ./lc-diag/host/host-secure.log` | |
`host gateway.livechatinc.com > ./lc-diag/host/host-gateway.log` | |
`host api.livechatinc.com > ./lc-diag/host/host-api.log` | |
echo "Step 3 - DONE!" | |
echo "========================" | |
echo "Step 4 - Creating tar.gz..." | |
DATE=`date +%Y-%m-%d` | |
archive_name="lc-diag-$DATE.tar.gz" | |
tar -zcvf $archive_name ./lc-diag | |
echo "Step 4 - DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment