Linux - how to monitor live connections

From Public wiki of Kevin P. Inscoe
Revision as of 15:39, 29 March 2018 by Kinscoe (talk | contribs) (Created page with "Monitor open connections, example shows port 80 (httpd) including listen, count and sorts it per IP: <pre> $ sudo watch "netstat -plan|grep :80|awk {'print \$5'} | cut -d: -f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"