Nginx-->進階-->Module-->ngx_http_stub_status_module

來源:互聯網
上載者:User

標籤:

一、模組介紹

The ngx_http_stub_status_module module provides access to basic status information.

This module is not built by default, it should be enabled with the --with-http_stub_status_module configuration parameter.

這個模組提供了訪問的基本訪問狀態資訊;

說明:狀態資訊包括活動串連數、server accepts已經接受的使用者請求的總個數、server handled即nginx已經處理的串連數(一般情況server accepts和server handled是相同的,即為已經接受的使用者請求個數和nginx已經處理完成的串連數是相同的)、server requests使用者的請求總數。

這個模組預設情況下是沒有安裝的,可以在配置的時候即為通過源碼安裝時./configure命令加上 --with-http_stub_status_module這個參數這種方式啟用該模組。

二、關於該模組的相關配置說明

配置執行個體

 

1 location /basic_status {2     stub_status;3 }
location配置

 

該配置可以在http的配置模組中啟用,也可以在具體的虛擬機器主機中啟用,一般情況下是在某個具體的虛擬機器主機中啟用,其目的是統計對應的網站的實際訪問情況。具體在哪裡啟用,看實際情況
This configuration creates a simple web page with basic status data which may look like as follows:
Active connections: 291 server accepts handled requests 16630948 16630948 31070465 Reading: 6 Writing: 179 Waiting: 106 
指令說明:
Syntax:     stub_status;
Default:     —
Context:     server, location
In versions prior to 1.7.5, the directive syntax required an arbitrary argument, for example, “stub_status on”.
在1.7.5版本之前,指令的文法需要一個任意參數,例如“stub_status on”
相關參數說明:
The following status information is provided:Active connections    The current number of active client connections including Waiting connections. 
  當前的活動串連數的個數,包括正在等待的串連數accepts The total number of accepted client connections.
  當前被接受的用戶端串連總數handled The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached (
for example, the worker_connections limit).
  所有被處理的串連數總數。通常情況下,這個參數的值和當前被接受的用戶端串連數是相同的(accepts),除非nginx對使用者的串連數做了限制。requests The total number of client requests.
  用戶端請求的個數Reading The current number of connections where nginx is reading the request header.
  當前nginx正在讀取要求標頭部資訊的串連數的個數,也就是說這個串連連進來了並且正在被nginx讀取請求的頭部的串連數的個數Writing The current number of connections where nginx is writing the response back to the client.
  當前nginx正在讀取其主體的請求的個數,或者正在處理其請求內容的請求的個數,或者正在向用戶端發送響應的個數 Waiting The current number of idle client connections waiting
for a request.

  長連結模式的保持串連的串連個數,即為正處於活動狀態的串連,正常情況下為reading+wirting

Nginx-->進階-->Module-->ngx_http_stub_status_module

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.