This page looks best with JavaScript enabled

PHPFpmTop

 ·  🎃 kr0m

PhpFpmTop is a PHP-FPM process monitoring tool that is very useful for debugging problems in the execution of PHP code as it will show us information such as requests per second, the time it takes for each PHP, and if there are queued executions.

In this case, the PHP-FPM server runs on FreeBSD but all steps are easily adaptable to any Unix system.

We make sure that PHP-FPM presents the status web:

vi /usr/local/etc/php-fpm.d/www.conf

pm.status_path = /status

We restart the service:

service php-fpm restart

We install Go since PhpFpmTop is written in Go:

pkg install go

We download the tool:

go get github.com/abrander/phpfpmtop

We start PhpFpmTop indicating the FPM socket:

/root/go/bin/phpfpmtop -socket /var/run/php-fpm.sock

The final result will be something like this:

If you liked the article, you can treat me to a RedBull here