[root@orderer ~]# netstat -ntap | grep ESTABLISHED | wc -l
232
[root@orderer ~]# netstat -nat|grep -i "27018"|wc -l
35
[root@orderer ~]# netstat -na | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
LISTEN 60
CLOSE_WAIT 20
ESTABLISHED 227
FIN_WAIT2 13
TIME_WAIT 140
[root@orderer ~]# netstat -nat | grep ESTABLISHED | awk '{print $5}'| awk -F: '{print $2}' | awk '{++S[$NF]} END {for(a in S)print a,S[a]}'|awk '$2>1 {print $1,$2}'|sort -n
443 3
3306 45
7050 2
8199 18
9092 9
27017 28
27018 222
45506 2