# 状态监测

## http\_stub\_status\_module

用于展示连接的状态数。

```nginx
Syntax: stub_status;
Default: 
Context: server,location

location /nginxstatus {
    stub_status;
}

# 页面会返回如下信息
# nginx当前活跃的连接数
Active connections: 1 
# server accepts： nginx处理握手的总次数
# handled： nginx处理的总的连接数
# requests：总的请求数
# 如果握手数与连接数相等，代表没有丢失
server accepts handled requests
 10 10 10 
# 读的个数
# 写的个数
# 等待个数（当nginx开启keep alive 长连接的情况下，客户端与服务端没有操作但是已经建立连接的数量）
Reading: 0 Writing: 1 Waiting: 0 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yangsx95.gitbook.io/notes/distributed/web-fu-wu-qi/nginx/zhuang-tai-jian-ce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
