How to view the number of concurrent request connections for a Web server

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.