netstat -nt | awk '{print $6}' | sort | uniq -c | sort -n -k 1 -r
来源: http://www.phpxs.com/code/1007123/