问题描述
我从 top 命令中发现 php-fpm 中的 CPU 负载很高。有什么办法可以通过php-fpm找到当前正在运行的文件吗?
解决方法
您可以通过在 php-fpm 池配置中设置 pm.status_path = /status
来激活 php-fpm 状态页面。并使用 apache 或 nginx 提供该页面。
你只需要访问http://statuspage/status?full,然后你就会看到php运行脚本是这样的。
如果你使用nginx,你可以关注this tutorial。