ngx_http_stub_status_module

ngx_http_stub_status_module 모듈은 기본 상태 정보에 대한 액세스를 제공합니다.

이 모듈은 기본적으로 구축되지 않으므로, –with-http_stub_status_module 구성 매개변수로 활성화해야 합니다.

예제 구성

location = /basic_status {
    stub_status;
}

이 구성은 다음과 같이 기본 상태 데이터로 간단한 웹 페이지를 생성합니다.

Active connections: 291
server accepts handled requests
 16630948 16630948 31070465
Reading: 6 Writing: 179 Waiting: 106

Directives

Syntax:  stub_status;
Default: —
Context: server, location

기본 상태 정보는 주변 위치에서 액세스할 수 있습니다.

1.7.5버전 이전에는 명령 구문에 임의의 인수(예: “stub_status on”)가 필요했습니다.

데이터

다음 상태 정보가 제공됩니다.

Active connections

Waiting 연결을 포함한 활성화된 클라이언트 연결의 현재 개수입니다.

accepts

수락된 클라이언트 연결의 총 개수입니다.

handled

처리된 연결의 총 개수입니다. 일반적으로 매개변수 값은 accepts와 동일합니다. 단, 일부 리소스 제한에 도달한 경우는 예외입니다(예: worker_connections 제한).

requests

클라이언트 요청의 총 개수입니다.

Reading

nginx가 요청 헤더를 읽는 연결의 현재 개수입니다.

Writing

nginx가 클라이언트에 응답을 다시 작성하는 연결의 현재 개수입니다.

Waiting

요청에 대기 중인 유휴 클라이언트 연결의 현재 개수입니다.

임베디드 변수

ngx_http_stub_status_module 모듈은 다음의 임베디드 변수를 지원합니다(1.3.14).

$connections_active

Active connections 값과 동일합니다.

$connections_reading

Reading 값과 동일합니다.

$connections_writing

Writing 값과 동일합니다.

$connections_waiting

Waiting 값과 동일합니다.