Summarize the number of open TCP connections by state
Материал из KLUG
Все очень просто
$ netstat -nt | awk '{print $6}' | sort | uniq -c | sort -n -k 1 -r
12 ESTABLISHED
3 CLOSE_WAIT
1 Foreign
1