]# netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
TIME_WAIT 260
CLOSE_WAIT 913
FIN_WAIT1 9
FIN_WAIT2 129
ESTABLISHED 1683
]# netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
TIME_WAIT 260
CLOSE_WAIT 913
FIN_WAIT1 9
FIN_WAIT2 129
ESTABLISHED 1683