This module provides access to information of slab usage for nginx/tengine shared memory.
Requesting URI /slab_stat, you will get information of slab and free page usage for nginx/tengine shared memory.
The output page may look like as follows:
$ curl http://localhost:80/slab_stat
Every line except the first three of output content has the same format, as follows:
shared memory: name of current shared memory zone
total: total size of current shared memory zone
- free: free size of current shared memory zone now
size: page size of current shared memory zone
pages: continuous page size that can be allocated
- start: start address of current continuous page size
end: end address of current continuous page size
slot: slot that can be allocated
- total: total number of current slot
- used: used number of current slot
- reqs: reqs number of current slot
- fails: fails number of current slot
The latest module is compatible with the following versions of nginx:
- 1.13.4 (stable version of 1.13.x)
Nginx cores older than 1.13.x should be patched (refer "Install").
- 2.1.1 (stable version of 2.1.x)
Tengine version older than 2.1.x should be patched (refer "Install").
Install this module from source:
$ wget http://nginx.org/download/nginx-1.13.4.tar.gz
slab_stat.patch should be applied when nginx cores older than 1.13.x, you can also generate this patch by diff with nginx 1.13.x.
$ patch -p1 < /path/to/ngx_slab_stat/slab_stat.patch
The information of nginx shared memory usage will be accessible from the surrounding location.
Now only support shared memory allocated from nginx and lua-nginx-module