实时查看及监控PHP-FPM的运行状态
2015-09-03 00:00
731 查看
PHP-FPM内置了状态页,开启后可查看PHP-FPM的详细运行状态,给PHP-FPM优化带来帮助。
打开php-fpm.conf,配置php-fpm状态页选项
配置nginx.conf,添加可访问server
重启或重载nginx,和php-fpm
浏览器访问结果:
可通过带不同参数查看php-fpm status输出格式:
PHP-FPM status参数说明:
打开php-fpm.conf,配置php-fpm状态页选项
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 restart service 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?full http://www.foo.bar/status?json&full http://www.foo.bar/status?html&full http://www.foo.bar/status?xml&full
PHP-FPM status参数说明:
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,缓慢请求的数量
相关文章推荐
- PHPCMS V9 分类信息模型 伪静态 htaccess的错误 附带官方分类信息htacces
- php字符串函数的学习
- PHP tools for Visual Studio 2013 安装、破解、配置教程
- php大力力 [042节] 今天做了一个删除功能
- rtp丢包重传demo
- php json_decode函数
- PHP大小写是否敏感问题的汇总
- php时间函数的学习
- PHP大小写是否敏感问题的汇总
- php分页类
- php判断文件夹是否存在,不存在则创建
- 格式化输出字符串之Format、IFormattable、IFormatProvider、ICustomFormatter
- PHP的SOAP工具包--nusoap
- php-fpm 启动参数及重要配置详解
- 烂泥:vsftpd单用户多目录配置
- 烂泥:vsftpd单用户多目录配置
- 烂泥:ubuntu下vsftpd虚拟用户配置
- 烂泥:ubuntu下vsftpd虚拟用户配置
- [转]php返回json数据中文显示的问题
- php获取在线xml的数据