The method of PHP-FPM open State statistics

Source: Internet
Author: User
This article mainly introduces the PHP-FPM open State statistics method, the article introduces very detailed, to everyone has a certain reference learning value, the need for friends below to see together.

This article mainly introduces about PHP-FPM open State statistics related content, share out for everyone to refer to the study, the following to see a detailed introduction:

Enable the PHP-FPM status feature


$ cat/usr/local/php/etc/php-fpm.conf | grep Statuspm.status_path =/php-fpm_status


Nginx Configuration

Add location to the default host


Location ~ ^/(php-fpm_status|ping) {Fastcgi_pass unix:/dev/shm/php-cgi.sock;//If you are not using sock, change to corresponding port include fastcgi.conf; Access_log off; Allow 127.0.0.1; Deny all; }


Access test


$ Curl 127.0.0.1/php-fpm_statuspool:   wwwprocess manager:dynamicstart time:  12/may/2017:13:12:55 +0800start Since:  25552accepted conn:8649listen queue:  0max listen queue:0listen queue len:0idle processes:13active proce Sses:1total Processes:14max Active Processes:7max children Reached:0slow requests:0


PHP-FPM Status Detailed

    • POOL-FPM pool name, mostly www

    • Process manager– processes management mode, value: static, dynamic

    • Start time– start date, if Reload php-fpm, the time will be updated

    • Start since– Run time

    • Accepted conn– the number of requests accepted by the current pool

    • Listen queue– request Wait queue, if this value is not 0, then increase the number of FPM processes

    • Max Listen queue– Requests the highest number of wait queues

    • Listen queue Len–socket wait queues length

    • Idle processes– Free Process number

    • Active processes– number of active processes

    • Total processes– Process Quantity

    • Max Active processes– maximum number of active processes (FPM start count)

    • Max children reached-the maximum number of times a process is limited, if the number is not 0, that means your maximum number of processes is too small, please change it a bit.

    • Slow requests– enabled php-fpm slow-log , number of slow requests

PHP-FPM Other parameters

PHP-FPM Status page A place to personalize is that it can take parameters, can take parameters JSON, XML, HTML, and the first three parameters can be combined with the full

Please try it yourselfurl?php-fpm_status?json

Summarize

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.