How to view Web Service concurrent Solicitation Connections 1, View Web service (Nginx Apache) concurrent pleading number and its TCP connectivity status: Netstat-n | awk \ '/^tcp/{++s[$NF]} END {for (a in S) print a, s[a]}\ ' netstat-n|grep ^tcp|awk \ ' {print $NF}\ ' |sort-nr|uniq-c or: Net Stat-n | awk \ '/^tcp/{++state[$NF]} END {for (key on state) print key,\ "t\", state[key]}\ ' return result is normal as follows: Last_ack 5 (number of requests awaiting disposition)
SYN_RECV Connecting:http://www.metabase.cn/time out:25s
Syn_recv connecting:http://www.jinanwuliangye.com Time out:25s
SYN_RECV Connecting:http://www.tongxinglong.com/time out:25s
SYN_RECV Connecting:http://www.qclchina.com/time out:25s
SYN_RECV Connecting:http://www.vipfuxin.com/time out:25s
SYN_RECV Connecting:http://www.minnan888.net/time out:25s
SYN_RECV Connecting:http://www.lcsyt.com/time out:25s
Syn_recv connecting:http://lf.yunnanw.cn Time out:25s
SYN_RECV Connecting:http://www.ceocbs.com/time out:25s
SYN_RECV Connecting:http://www.yzbljp.com/time out:25s
SYN_RECV Connecting:http://www.hyyfscl.com/time out:25s
SYN_RECV Connecting:http://www.shoudashou.com/time out:25s
SYN_RECV Connecting:http://www.shuoma.com.cn/time out:25s
Established 1597 (normal data transfer status) fin_wait1 51fin_wait2 504time_wait 1057 (end of disposition, number of requests awaiting timeout) Other parameters clarified: CLOSED: No cohesion is active or stopping listen: The service is waiting to enter the call SYN_RECV: A cohesive pleading has arrived, waiting to confirm syn_sent: Application once began, turn a convergence established: normal data transmission status Fin_ WAIT1: The application says it has done Fin_wait2: the other side has agreed to release itmed_wait: Wait for all the packets to die closing: Both sides simultaneously try to close time_wait: The other side has initialized a release last_ack: Wait for all the packets to die 2, view Nginx running process number Ps-ef | grep Nginx | The number returned by Wc-l is the number of nginx running processes, and if Apache executes Ps-ef | grep httpd | wc-l 3, view Web service process connections: NETSTAT-ANTP | grep 80 | grep established-c 4, view MySQL process connections: ps-axef | grep mysqld-c