如何查看Web伺服器並發請求串連數

來源:互聯網
上載者:User

標籤:http   com   資料   os   cti   for   

如何查看Web效勞器並發懇求銜接數1、查看Web效勞器(Nginx Apache)的並發懇求數及其TCP銜接狀態: 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 或者:netstat -n | awk \‘/^tcp/ {++state[$NF]} END {for(key in state) print key,\"t\",state[key]}\‘返回結果普通如下: LAST_ACK 5 (正在等候處置的懇求數)

 

SYN_RECV 30 connecting: http://www.metabase.cn/ time out :25s

SYN_RECV 30 connecting: http://www.jinanwuliangye.com time out :25s

SYN_RECV 30 connecting: http://www.tongxinglong.com/ time out :25s

SYN_RECV 30 connecting: http://www.qclchina.com/ time out :25s

SYN_RECV 30 connecting: http://www.vipfuxin.com/ time out :25s

SYN_RECV 30 connecting: http://www.minnan888.net/ time out :25s

SYN_RECV 30 connecting: http://www.lcsyt.com/ time out :25s

SYN_RECV 30 connecting: http://lf.yunnanw.cn time out :25s

SYN_RECV 30 connecting: http://www.ceocbs.com/ time out :25s

SYN_RECV 30 connecting: http://www.yzbljp.com/ time out :25s

SYN_RECV 30 connecting: http://www.hyyfscl.com/ time out :25s

SYN_RECV 30 connecting: http://www.shoudashou.com/ time out :25s

SYN_RECV 30 connecting: http://www.shuoma.com.cn/ time out :25s

 

ESTABLISHED 1597 (正常資料轉送狀態)FIN_WAIT1 51FIN_WAIT2 504TIME_WAIT 1057 (處置終了,等候逾時完畢的懇求數) 其他參數闡明: CLOSED:無銜接是活動的或正在停止LISTEN:效勞器在等候進入呼叫SYN_RECV:一個銜接懇求曾經抵達,等候確認SYN_SENT:應用曾經開端,翻開一個銜接ESTABLISHED:正常資料轉送狀態FIN_WAIT1:應用說它曾經完成FIN_WAIT2:另一邊已同意釋放ITMED_WAIT:等候一切分組死掉CLOSING:兩邊同時嘗試關閉TIME_WAIT:另一邊已初始化一個釋放LAST_ACK:等候一切分組死掉 2、查看Nginx運轉進程數ps -ef | grep nginx | wc -l返回的數字就是nginx的運轉進程數,假如是apache則執行ps -ef | grep httpd | wc -l 3、查看Web效勞器進程銜接數:netstat -antp | grep 80 | grep ESTABLISHED -c 4、查看MySQL進程銜接數:ps -axef | grep mysqld -c

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.