pm.status_path = /phpfpm_status配置nginx.conf,添加可访问server
server {listen 80;server_name 127.0.0.1;location /phpfpm_status {fastcgi_pass 127.0.0.1:9000;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;}}重启或重载nginx,和php-fpm
service php-fpm restartservice nginx restart浏览器访问结果:
可通过带不同参数查看php-fpm status输出格式:
http://www.foo.bar/status #默认纯文本http://www.foo.bar/status?json #json格式http://www.foo.bar/status?html #html格式http://www.foo.bar/status?xml #xml格式 #full参数可查看进程详细信息http://www.foo.bar/status?fullhttp://www.foo.bar/status?json&fullhttp://www.foo.bar/status?html&fullhttp://www.foo.bar/status?xml&fullPHP-FPM status参数说明:
pool – fpm池子名称,大多数为wwwprocess manager – 进程管理方式,值:static, dynamic or ondemand. dynamicstart 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,缓慢请求的数量总结