modules/ngx_debug_conn/README.md
This module provides access to information of connection usage for nginx/tengine.
http {
server {
listen 80;
location = /debug_conn {
debug_conn;
}
}
}
Requesting URI /debug_conn, you will get information of connection usage for nginx/tengine. The output page may look like as follows:
$ curl 'localhost:80/debug_conn'
pid:70568
connections:3
--------- [1] --------
conns[i]: 0
fd: 6
addr: 0.0.0.0:80
sent: 0
action: (null: listening)
handler: r:000000010DAEBEC0 w:0000000000000000
requests: 0
poolsize: 0
--------- [2] --------
conns[i]: 1
fd: 7
addr: (null)
sent: 0
action: (null: channel)
handler: r:000000010DAFB770 w:0000000000000000
requests: 0
poolsize: 0
--------- [3] --------
conns[i]: 2
fd: 3
addr: 127.0.0.1
sent: 0
action: (null)
handler: r:000000010DB28CA0 w:000000010DB28CA0
requests: 1
poolsize: 0
********* request ******
uri: http://localhost/debug_conn
handler: r:000000010DB26820 w:000000010DB29770
startsec: 1542356262
poolsize: 0
Every block like "[1]" except the related connection usage as follows:
The latest module is compatible with the following versions of nginx:
Install this module from source:
$ wget http://nginx.org/download/nginx-1.13.4.tar.gz
$ tar -xzvf nginx-1.13.4.tar.gz
$ cd nginx-1.13.4/
$ ./configure --add-module=/path/to/ngx_debug_conn
$ make -j4 && make install
Syntax: debug_conn
Default: none
Context: server, location
The information of nginx connection usage will be accessible from the surrounding location.
********* request ******
The request block will only show when request exists in connection.