Linux: get socket-status (php5-fpm) via linux command
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:
http://lumux.co.uk/2012/08/02/php-fpm-status-stats-without-a-webserver/
Orginally posted on my german homepage:
http://pkern.at/1649/linux-status-eines-unix-sockets-von-php5-fpm-abrufen-ohne-webserver :)
Written by Patrik Kernstock
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#