简体   繁体   English

如何检查php-fpm是否已正确安装并运行?

[英]How to check if php-fpm is installed and running correctly?

As in title, how to check php-fpm status? 在标题中,如何检查php-fpm状态? Is it running? 它在运行吗? How many request serving? 请求服务多少? Thanks. 谢谢。

Is ps -ef | grep php-fpm ps -ef | grep php-fpm ps -ef | grep php-fpm too simple an answer for the first part? ps -ef | grep php-fpm第一部分的答案太简单了吗?

You could also use the ping feature that you can enable with the ping.path configuration directive . 您还可以使用可以使用ping.path配置指令启用的ping功能。

The second part can be achieved with the pm.status_path configuration directive that gives you access to a number of statistics, including the number of accepted connections. 第二部分可以使用pm.status_path配置指令实现,该指令允许您访问许多统计信息,包括已接受连接的数量。

You can get the SAPI with 您可以使用SAPI

  • php_sapi_name — Returns the type of interface between web server and PHP php_sapi_name - 返回Web服务器和PHP之间的接口类型

Returns the interface type, as a lowercase string. 以小写字符串形式返回接口类型。 Although not exhaustive, the possible return values include aolserver, apache, apache2filter, apache2handler, caudium, cgi (until PHP 5.3), cgi-fcgi, cli, continuity, embed, isapi, litespeed, milter, nsapi, phttpd, pi3web, roxen, thttpd, tux, and webjames. 虽然不是详尽无遗,但可能的返回值包括aolserver,apache,apache2filter,apache2handler,caudium,cgi(直到PHP 5.3),cgi-fcgi,cli,continuity,embed,isapi,litespeed,milter,nsapi,phttpd,pi3web,roxen, thttpd,tux和webjames。

For status and how many requests are served you might want to use exec or system . 对于状态和提供的请求数量,您可能希望使用execsystem

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM