linux – 查找每个HTTPD进程上运行的PHP脚本
发布时间:2020-12-13 17:53:35 所属栏目:Linux 来源:网络整理
导读:我想知道一种检查HTTPD进程的方法,以找出在其上运行的 PHP脚本. 我已经做了一个“netstat”,发现有些进程持有DB和网络套接字太长时间了,现在我想知道是什么脚本导致了它. 顺便说一下,我正在使用Linux. 解决方法 您需要启用Apache模块 mod_status (CentOs主Ap
我想知道一种检查HTTPD进程的方法,以找出在其上运行的
PHP脚本.
我已经做了一个“netstat”,发现有些进程持有DB和网络套接字太长时间了,现在我想知道是什么脚本导致了它. 顺便说一下,我正在使用Linux. 解决方法
您需要启用Apache模块
mod_status (CentOs主Apache配置文件位于/etc/httpd/conf/httpd.conf)
LoadModule status_module modules/mod_status.so 使用选项 # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # ExtendedStatus On 以及为此设置的一些访问权限(将XXX.XXX.XXX.XXX替换为您的IP – 这可以在与上面相同的配置文件中找到) # Allow server status reports generated by mod_status,# with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from localhost 127.0.0.1 XXX.XXX.XXX.XXX </Location> 最后,您将通过访问http://your-server-name/server-status来查看每个HTTPD进程正在执行的操作 这将显示当前正在以here呈现的方式处理的pids和URL. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |