Skip to content

Instantly share code, notes, and snippets.

@jetsuit
Created February 1, 2018 17:20
Show Gist options
  • Save jetsuit/9e714f7c288511abd4c68572eb6b2270 to your computer and use it in GitHub Desktop.
Save jetsuit/9e714f7c288511abd4c68572eb6b2270 to your computer and use it in GitHub Desktop.
Read php-fpm status
#! /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