I'd like to know a way of inspecting HTTPD processes to find which PHP script is running on them.
I already did a "netstat" and found that some processes held DB and Network sockets for too long and now i want to know what scripts are causing it.
Btw, i'm using Linux.
Best Answer
You need to have Apache module
mod_status
enabled (CentOs main Apache config file is located at /etc/httpd/conf/httpd.conf)with option
ExtendedStatus on
(this is to be set in the same config file as above)and some access rights set for that (replace below
XXX.XXX.XXX.XXX
with your IP - this is to be found in the same config file as above)Finally you will be seing what each HTTPD process is doing by accessing http://your-server-name/server-status
This will show the pids and URLs currently being processed in the way presented here.