Skip to content

Instantly share code, notes, and snippets.

@burinov
Created February 7, 2012 17:11
Show Gist options
  • Save burinov/1760784 to your computer and use it in GitHub Desktop.
Save burinov/1760784 to your computer and use it in GitHub Desktop.
Network Tuning & Monitoring
# All these tools are good to see traffic in real time
$ sudo iftop
$ bmon
$ sudo iptraf
# Show number of established connections
$ netstat -n | awk '/^tcp/ {t[$NF]++}END{for(state in t){print state, t[state]} }'
$ netstat -n | grep 5222 | awk '/^tcp/ {t[$NF]++}END{for(state in t){print state, t[state]} }'
$ netstat -ant | grep 5222 | awk '{print $6}' | sort | uniq -c | sort -n
# Linux List The Open Ports And The Process That Owns Them
$ sudo lsof -i
$ sudo netstat -lptu
# TCP/IP Tuning
#
# >. http://en.wikipedia.org/wiki/TCP_tuning
#
# >. http://www.kernelfaq.com/2007/07/tcp-tuning-sysctls.html
#
# >. http://www.opennet.ru/base/net/tune_freebsd.txt.html
#
# 1. http://www.opennet.ru/tips/info/1417.shtml
# 2. http://www.mjmwired.net/kernel/Documentation/networking/ip-sysctl.txt
# 3. http://www.itpad.ru/?p=1154
# 4. http://serverfault.com/questions/27271/why-does-1gbit-card-have-output-limited-to-80-mib/27292#27292
# 5. http://ubuntulinuxhelp.com/speed-up-your-internet-connection-in-ubuntu-linux-part-2/
#
# B1. http://fasterdata.es.net/fasterdata/host-tuning/linux/
# B2. http://fasterdata.es.net/fasterdata/host-tuning/background/#t1
#
# C1. https://calomel.org/network_performance.html
#
# X. http://www.redbooks.ibm.com/redpapers/pdfs/redp4285.pdf
# Y. http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
# Z. http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/scaling.txt;hb=HEAD
#
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment