contextualcode / php-fpm-status-cli
PHP-FPM 状态页面 CLI
1.0.2
2017-11-28 13:29 UTC
Requires
- hoa/fastcgi: ~3.0
- hoa/socket: ~1.0
- mnapoli/silly: ^1.5
This package is not auto-updated.
Last update: 2024-09-20 01:27:50 UTC
README
简单 CLI 工具,当 HTTP 服务器未配置为提供状态页面时,可用于访问 PHP-FPM 状态页面。
安装
$ composer require wizaplace/php-fpm-status-cli
使用方法
$ php-fpm-status -h
Usage:
php-fpm-status [options]
Options:
--socket=SOCKET Unix socket or tcp address where php-fpm listens [default: "unix:///run/php/php7.1-fpm.sock"]
--path=PATH The URI to view the FPM status page. If this value is not set, no URI will be recognized as a status page. [default: "/status"]
--full Show full server status
--format=FORMAT Output format for the status, txt by default, [html, json, xml] available
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Get PHP-FPM status
socket
可以是 UNIX 套接字的 unix:///path/to/socket
或 TCP 地址的 tcp://127.0.0.1:9000
。
path
是主 FPM 配置或池中的 pm.status_path
配置选项。
输出
$ php-fpm-status pool: www process manager: dynamic start time: 18/Oct/2017:13:48:20 +0000 start since: 6 accepted conn: 1 listen queue: 0 max listen queue: 0 listen queue len: 128 idle processes: 1 active processes: 1 total processes: 2 max active processes: 1 max children reached: 0 slow requests: 0
使用 --full
选项可以获取更多信息。