php-fpm running status monitoring

PHP-FPM has a built-in status page. After opening, you can view the detailed running status of PHP-FPM, which can help PHP-FPM optimization.


1. Open php-fpm.conf and configure the php-fpm status page options:

pm.status_path = /phpfpm_status     //'phpfpm_status' can be customized

 2. Configure nginx.conf and add server

server {

    listen 80;
    server_name 127.0.0.1;  #或域名

    location /phpfpm_status {
        fastcgi_pass 127.0.0.1:9000;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
    }
}

3. Restart or reload nginx and php-fpm

  1. service php-fpm restart
  2. service nginx restart

 

If there is no accident, visit http://127.0.0.1/phpfpm_status to see:

Parameter Description:

  1. pool – fpm process pool name, mostly www
  2. process manager – process management method, value: static, dynamic or ondemand.dynamic
  3. start time - start date, if php-fpm is reloaded, the time will be updated
  4. start since - how long to run
  5. accepted conn - the number of requests accepted by the current pool
  6. listen queue - request waiting queue, if this value is not 0, then the number of processes in FPM may be increased
  7. max listen queue – the highest number of requests to wait in the queue
  8. listen queue len - socket wait queue length
  9. idle processes – the number of idle processes
  10. active processes – the number of active processes
  11. total processes – the total number of processes
  12. max active processes - the maximum number of active processes (counted from the start of FPM)
  13. max children reached - The number of times the maximum number of processes limit has been reached.
  14. slow requests - php-fpm slow-log enabled, the number of slow requests

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326386767&siteId=291194637