Last active
June 21, 2023 09:10
-
-
Save scottsb/fc848b1e9ce77a784d3061140d3c795d to your computer and use it in GitHub Desktop.
PHP-FPM Full Status as Table
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
#!/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