Skip to content

Instantly share code, notes, and snippets.

@scottsb
Last active June 21, 2023 09:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottsb/fc848b1e9ce77a784d3061140d3c795d to your computer and use it in GitHub Desktop.
Save scottsb/fc848b1e9ce77a784d3061140d3c795d to your computer and use it in GitHub Desktop.
PHP-FPM Full Status as Table
#!/usb/bin/env bash
# Update as needed:
# * Status page URL for php-fpm if not at http://127.0.0.1/status
# * Host header of website if required to match correct pool
# Columns (as of PHP 7.1):
# * pid
# * state
# * start time
# * start since
# * requests
# * request duration
# * request method
# * request URI
# * content length
# * user
# * script
# * last request cpu
# * last request memory
# See meaning of these here: https://easyengine.io/tutorials/php/fpm-status-page/
# To view output updated in real time, wrap this command in double quotes and pass an argument to `watch`. For example:
# watch "curl --silent ..."
curl --silent -H 'Host: example.com' http://127.0.0.1/status?full | paste -s | sed -r -e 's/[^*]+\*+//' -e 's/\*+/\n/g' -e 's/\t[^:\n]+:\s+/\t/g' | column -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment