Is there a way to get the PHP script filename that is currently hammering my VPS?
For example, when I view "top", I see:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7622 itil 17 0 61388 11m 6004 R 45.8 2.3 0:00.13 php
7626 itil 17 0 58360 8632 5440 R 24.6 1.6 0:00.07 php
How can I find out what file is being processed by PHP at that particular time?
To show the arguments passed to the comand, use the next command:
If you just see something like
php somefile.php
, get the current working directory using:replace
$PID
by the PID of the process as shown byps
.