nginx_status

 1 server {
 2         listen 80;
 3         server_name blog.oldboy.com;
 4         root /code/wordpress;
 5         index index.php index.html;
 6 
 7         location ~ \.php$ {
 8                 root /code/wordpress;
 9                 fastcgi_pass   127.0.0.1:9000;
10                 fastcgi_index  index.php;
11                 fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
12                 include        fastcgi_params;
13         }
14 
15         location /nginx_status {
16                 stub_status;
17         }
18 }
View Code

 压测

ab -n 10000 -c 100 blog.oldboy.com/index.php

Active connections

当前活动客户端连接数,包括 Waiting 连接数。
accepts
已接受的客户端连接总数。
handled
处理的连接总数。通常,参数值与 accepts  除非已达到某些资源限制(例如,  worker_connections 限制)相同。
requests
客户端请求的总数。
Reading
nginx正在读取请求标头的当前连接数。
Writing
nginx将响应写回客户端的当前连接数。
Waiting
当前等待请求的空闲客户端连接数。

猜你喜欢

转载自www.cnblogs.com/john5yang/p/10261801.html