你知道nginx怎樣查看并發連接數么

你知道nginx怎樣查看并發連接數么

查看并發連接數有兩種方式,分別是:

(推薦教程:nginx教程

1、在nginx.config文件中配置,然后通過瀏覽器查看;

2、使用命令查看;

這里第一種方式來進行演示:

location?/status?{ stub_status?on; access_log?logs/status.log; auth_basic?"nginxStatus";?}

你知道nginx怎樣查看并發連接數么

在server里面加入上述代碼,然后在瀏覽器中輸入:

你知道nginx怎樣查看并發連接數么

解析:

Active connections??? //當前 Nginx 正處理的活動連接數。

server accepts handledrequests //總共處理了22 個連接 , 成功創建 22 次握手,總共處理了64個請求。

Reading //nginx 讀取到客戶端的 Header 信息數。

Writing //nginx 返回給客戶端的 Header 信息數。

Waiting //開啟 keep-alive 的情況下,這個值等于 active – (reading + writing),意思就是 Nginx 已經處理完正在等候下一次請求指令的駐留連接。

以上就是你知道

? 版權聲明
THE END
喜歡就支持一下吧
點贊6 分享