Reputation: 1436
I want to get PHP-FPM /status?full
page via CLI. In one command, or with a bash script, I need to display the most verbose output that the PHP process manager can return but without using nginx or apache. I'm using a unix socket located in /var/run/php5.6-fpm.sock
Upvotes: 4
Views: 5862
Reputation: 1436
In debian, you can use these commands:
sudo apt install -y libfcgi0ldbl
sudo -u www-data SCRIPT_NAME=/status \
SCRIPT_FILENAME=/status \
QUERY_STRING=full \
REQUEST_METHOD=GET \
cgi-fcgi -bind -connect /var/run/php5.6-fpm.sock
Here is the output
pool: www
process manager: ondemand
start time: 21/Jul/2017:11:44:35 +0200
start since: 48122714
accepted conn: 23412055
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 1
active processes: 1
total processes: 2
max active processes: 5
max children reached: 622
slow requests: 0
************************
pid: 21554
state: Idle
start time: 29/Jan/2019:09:55:19 +0100
start since: 870
requests: 171
request duration: 109
request method: GET
request URI: -?full
content length: 0
user: -
script: -
last request cpu: 0.00
last request memory: 2097152
************************
pid: 20633
state: Running
start time: 29/Jan/2019:09:24:04 +0100
start since: 2745
requests: 563
request duration: 122
request method: GET
request URI: /status?full
content length: 0
user: -
script: -
last request cpu: 0.00
last request memory: 0
Upvotes: 10