Skip to content

Instantly share code, notes, and snippets.

@scottsb
Last active July 29, 2019 15:45
Embed
What would you like to do?
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