Last active
September 23, 2015 01:02
-
-
Save richbodo/8f4204d10a7bc2ae6262 to your computer and use it in GitHub Desktop.
Simple command line report of network status for mac OSX
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/sh | |
echo "******************" | |
echo "* En0 IP, Gateway, and Nameservers" | |
echo "******************" | |
echo | |
ifconfig en0 | grep -v inet6 | head -n 3 | |
netstat -nr | head -n 5 | |
scutil --dns | grep -i nameserver | |
echo | |
echo "******************" | |
echo "* Lsof tcp listeners (sudo or ctrl-c): " | |
echo "******************" | |
echo | |
sudo lsof -iTCP -sTCP:LISTEN -P -n | |
echo | |
echo "******************" | |
echo "* Network stuff in syslog: " | |
echo "******************" | |
echo | |
grep -i -E 'network|en0' /var/log/system.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment