I found a high CPU loading in php-fpm from the top command. Is there any way to find which file is currently running by php-fpm?
Asked
Active
Viewed 2,398 times
0
-
file or process? – dev_mustafa Feb 17 '21 at 14:39
-
The php file that the php-fpm is running. – hatted Feb 18 '21 at 07:01
-
Try running `php -aux | grep php-fpm` this will list all the process – dev_mustafa Feb 18 '21 at 16:13
-
Do you mean 'ps -aux | grep php-fpm' ? – hatted Feb 24 '21 at 05:38
-
yes my bad not php it is ps – dev_mustafa Feb 24 '21 at 14:42
-
I can only see this result. No php filename is listed. – hatted Feb 26 '21 at 03:06
-
www-data 3560 0.0 0.1 530256 11016 ? S Feb22 0:00 php-fpm: pool www www-data 3563 0.0 0.1 530256 11016 ? S Feb22 0:00 php-fpm: pool www – hatted Feb 26 '21 at 03:06
1 Answers
0
you can activate php-fpm status page by set pm.status_path = /status
in php-fpm pool configuration. and serve that page with apache or nginx.
you just have to access http://statuspage/status?full, then you will see php running script like this.
if you using nginx, you can follow this tutorial.

nothinux
- 451
- 2
- 10