Linux - how to monitor live connections

From Public wiki of Kevin P. Inscoe
Jump to navigation Jump to search

Monitor open connections, example shows port 80 (httpd) including listen, count and sorts it per IP:

$ sudo watch "netstat -plan|grep :80|awk {'print \$5'} | cut -d: -f 1 | sort | uniq -c | sort -nk 1"