}
$ curl 127.0.0.1:88/nginx_status
Active connections: 1
server accepts handled requests
788163 788163 788163
Reading: 0 Writing: 1 Waiting: 0
Active connections
The current number of active client connections including Waiting connections.
活跃客户端连接数,包括处于等待状态的连接数
accepts
The total number of accepted client connections.
接收到的客户端连接总数
handled
The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached
处理请求的总数。通常情况下,这个值和accepts的值相同。除非达到了一些资源限制。例如设置worker_connections1024; 设置一个worker进程能够打开的最大并发连接数。
requests
The total number of client requests.
客户端请求总数
Reading
The current number of connections where nginx is reading the request header.
当前Nginx正在读取请求头的连接数量
Writing
The current number of connections where nginx is writing the response back to the client.
当前Nginx正在将响应写回到客户端的连接数量
Waiting
The current number of> 当前正在等待请求的闲置客户端连接数量
$ curl 127.0.0.1:88/php-fpm_status
pool: www
process manager: dynamic
start time: 16/Nov/2014:13:29:11 +0800
start since: 77844
accepted conn: 202788
listen queue: 0
max listen queue: 1
listen queue len: 128
idle processes: 6
active processes: 1
total processes: 7
max active processes: 4
max children reached: 0
slow requests: 0
pool pool名称
process manager static or dynamic
start time 启动时间
start since 启动了多长时间,以秒为单位
accepted conn pool接收到的请求数量 listen queue the number of request in the queue of pending connections.这个值如果不为0,最好增加PHP-FPM的进程数量 max listen queue the maximum number of requests in the queue of pending connections since FPM has started
listen queue len the> idle processes the number of> active processes the number of active processes
total processes the number of> max active processes the maximum number of active processes since FPM has started max children reached number of times, the process limit has been reached, when pm tries to start more children. If that value is not zero, then you may need to increase max process limit for your PHP-FPM pool. Like this, you can find other useful information to tweak your pool better way.如果这个值不为0,最好增大最大进程的限制。 slow requests 如果这个值不为0,表示有处理慢的程序
$ curl 127.0.0.1:88/php-fpm_status?full
pool: www
process manager: dynamic
start time: 17/Nov/2014:16:09:17 +0800
start since: 1139
accepted conn: 3354
listen queue: 0
max listen queue: 0
listen queue len: 128
idle processes: 5
active processes: 1
total processes: 6
max active processes: 2
max children reached: 0
slow requests: 0
************************
pid: 19921
state: Idle
start time: 17/Nov/2014:16:09:17 +0800
start since: 1139
requests: 563
request duration: 223
request method: GET
request URI: /php-fpm_status
content length: 0
user: -
script: -
last request cpu: 0.00
last request memory: 262144
curl 127.0.0.1:88/php-fpm_status?json
curl 127.0.0.1:88/php-fpm_status?html
curl 127.0.0.1:88/php-fpm_status?xml
2.编写Nginx和PHP-FPM状态信息获取脚本
nginx_status.sh
#!/bin/bash
#check nginx status
/usr/bin/curl http://$ip:$port/php-fpm_status 2>/dev/null|grep "max children reached:"|awk '{print $4}'
}
$1
3.添加zabbix的子配置文件
nginx_status_zabbix.conf
### Option: UserParameter
# User-defined parameter to monitor. There can be several user-defined parameters.