Is there any way to see active processes in PHP (like which files are being executed)?
In linux you can install apachetop. This marvellous tool scans your webserver log files showing you which files are being called it has some excellent metrics like showing which ip's are access which scripts. or which are the most popular scripts and files being called.
Another option is to use lsof
which lists open files, but as files are opened and closed rather quickly it may not really help
here is a command to watch all open php files
watch -n1 "lsof | grep '\.php'"
watch -n1
is a command that repeatedly runs a command every second
The command is lsof | grep '\.php'
which means list all open files and show only the ones with a .php in the filename
I have run this on a slow webserver and saw nothing, but I tested it and it does work. It may be that the scripts are being opened and closed so fast that the command misses them.
DC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With