Created
February 1, 2018 17:20
-
-
Save jetsuit/9e714f7c288511abd4c68572eb6b2270 to your computer and use it in GitHub Desktop.
Read php-fpm status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
COUNTER=0 | |
while [ $COUNTER -lt 1000 ]; do | |
SCRIPT_NAME=/status \ | |
SCRIPT_FILENAME=/status \ | |
REQUEST_METHOD=GET \ | |
cgi-fcgi -bind -connect 127.0.0.1:9000 | |
sleep 5 | |
let COUNTER=COUNTER+1 | |
done | |
# usage example - sh fpm-status.sh > fpmstatus.log & | |
# then | |
# tail -f fpmstatus.log | |
# kill %1 - to kill job | |
# required cgi-fcgi package (For alpine linux installation string is "apk add fcgi") | |
# for alpine in /usr/local/etc/php-fpm.d/www.conf uncomment param "pm.status_path" or set it to value to /status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment