Networking Troubleshooting
From wikinotes
NOTE:
don't use this, identify the networking layer with the problem and use appropriate tools.
troubleshooting websites
curl
I find curl most helpful in identifying code problems.
For example, I had issues with HTTP_HOST http headers behind a reverse proxy.
curl (in addition to sourcecode) helped me identify which HTTP header I needed to change.curl -i http://website.com | less -Ri # show page && headers curl -vX OPTIONS http://website.com # prints headerschromium
I found this most helpful for everything following the initial connection.
chrome will show you get requests (and urls) for all of the resources (ex: css, images, ..).Options > More Tools > Developer Tools: - Console: # show connections, and status (mouseover to see request urls)
troubleshooting DNS
- use dig to see how long the DNS resolve actually took
- try using the ip address directly and compare results
- test using ping
troubleshooting speed
- test using traceroute/tracert (see which part of ping is taking a long time)
- use
wget -d website.com
to identify if send or reply is cause of slowness