查看Linux下的网络连接状态命令

查看http进程数

[root@localhost conf]# ps -ef|grep httpd|wc -l
333

统计连接数状态:

[root@localhost conf]# netstat -n|awk '/^tcp/{++S[$NF]} END {for(a in S) print a,S[a]}'
LAST_ACK 173
SYN_RECV 35
CLOSE_WAIT 159
ESTABLISHED 152
FIN_WAIT1 29
FIN_WAIT2 10
CLOSING 39
TIME_WAIT 103