PHP-FPM 状态查看

PHP-FPM 状态查看

配置 php-fpm.conf
开启
pm.status_path = /status

配置 nginx servcer

server {
    listen       80;
    server_name  php.test.com;
    location /status {
            fastcgi_pass 127.0.0.1:9000;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
    }
}

host 127.0.0.1 php.test.com

浏览器访问:http://php.text.com/status
http://php.text.com/status #默认纯文本
http://php.text.com/status?json #json格式
http://php.text.com/status?html #html格式
http://php.text.com/status?xml #xml格式

#full参数可查看进程详细信息
http://php.text.com/status?full
http://php.text.com/status?json&full
http://php.text.com/status?html&full
http://php.text.com/status?xml&full

pool – fpm池子名称,大多数为www
process manager – 进程管理方式,值:static, dynamic or ondemand. dynamic
start time – 启动日期,如果reload了php-fpm,时间会更新
start since – 运行时长
accepted conn – 当前池子接受的请求数
listen queue – 请求等待队列,如果这个值不为0,那么要增加FPM的进程数量
max listen queue – 请求等待队列最高的数量
listen queue len – socket等待队列长度
idle processes – 空闲进程数量
active processes – 活跃进程数量
total processes – 总进程数量
max active processes – 最大的活跃进程数量(FPM启动开始算)
max children reached – 大道进程最大数量限制的次数,如果这个数量不为0,那说明你的最大进程数量太小了,请改大一点。
slow requests – 启用了php-fpm slow-log,缓慢请求的数量

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注