It's easy to get the status of the current php5-fpm socket through an webserver. But I needed a solution to get the status directly with a linux command.
The solution was quite easy. Just two variables and one command:
export SCRIPTFILENAME=/fpm-status; export SCRIPTNAME=/fpm-status; cgi-fcgi -bind -connect /etc/php5/fpm/sockets/www.socket
Just be sure, you added the correct line in the socket-conf:
pm.status_path = /fpm-status
The output looks like that one:
A nice shell script you can find here:
Orginally posted on my german homepage: