Created
February 12, 2011 22:49
-
-
Save apinstein/824213 to your computer and use it in GitHub Desktop.
Want to see what processes are using your bandwidth? Don't have ntop?
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 | |
# Try this... kinda a hack but better than any other alternative I know of: | |
for i in `netstat -an | grep EST | awk '{ print $5; }' | sort | uniq | grep -v 127.0.0.1 | grep -v ::1 | sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/'`; echo -n "Checking IP: $i => " && dig +short -x $i && echo -n " PROCESS: " && (lsof -i | grep $i) && echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment