[英]How to get current worker connections being used by nginx?
Nginx.conf,看起來像這樣
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
命令ulimit -n
給出了可用的工作連接數,我想要 nginx 當前正在使用的數字。
ngx_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
來源:https ://nginx.org/en/docs/http/ngx_http_stub_status_module.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.