启用php-fpm状态详解
php-fpm和nginx一样内建了一个状态页,对于想了解php-fpm的状态以及监控php-fpm非常有帮助。为了后续的zabbix监控,我们需要先了解php-fpm状态页是怎么回事。 1. 启用php-fpm状态功能 # cat? /usr/local/php-5.5.10/etc/php-fpm.conf | grep status_pathpm.s
php-fpm和nginx一样内建了一个状态页,对于想了解php-fpm的状态以及监控php-fpm非常有帮助。为了后续的zabbix监控,我们需要先了解php-fpm状态页是怎么回事。 1. 启用php-fpm状态功能
# cat? /usr/local/php-5.5.10/etc/php-fpm.conf | grep status_path pm.status_path = /status
server { ??? listen? *:80 default_server; ??? server_name _; ??? location ~ ^/(status|ping)$ ??? { ?? ??? ?include fastcgi_params; ?? ??? ?fastcgi_pass 127.0.0.1:9000; ?? ??? ?fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; ??? } }
# service nginx restart # service php-fpm restart
# curl http://www.ttlsa.com/status pool:???????????????? www process manager:????? dynamic start time:?????????? 14/May/2014:22:40:15 +0800 start since:????????? 58508 accepted conn:??????? 33 listen queue:???????? 0 max listen queue:???? 8 listen queue len:???? 0 idle processes:?????? 2 active processes:???? 1 total processes:????? 3 max active processes: 5 max children reached: 0 slow requests:??????? 2091
# curl http://127.0.0.1/status?json {"pool":"www","process manager":"dynamic","start time":1400078415,"start since":59624,"accepted conn":27,"listen queue":0,"max listen queue":8,"listen queue len":0,"idle processes":2,"active processes":1,"total processes":3,"max active processes":5,"max children reached":0,"slow requests":2145}
# curl http://127.0.0.1/status?xml <?xml version="1.0" ?> www dynamic 1400078415 59640 36 0 8 0 2 1 3 5 0 2145
# curl http://127.0.0.1/status?html PHP-FPM Status Page poolwww process managerdynamic start time14/May/2014:22:40:15 +0800 start since59662 accepted conn8 listen queue0 max listen queue8 listen queue len0 idle processes2 active processes1 total processes3 max active processes5 max children reached0 slow requests2147
# curl http://127.0.0.1/status?full pool:???????????????? www process manager:????? dynamic start time:?????????? 14/May/2014:22:40:15 +0800 start since:????????? 59695 accepted conn:??????? 1 listen queue:???????? 0 max listen queue:???? 8 listen queue len:???? 0 idle processes:?????? 2 active processes:???? 1 total processes:????? 3 max active processes: 5 max children reached: 0 slow requests:??????? 2148 ************************ pid:????????????????? 29050 state:??????????????? Idle start time:?????????? 15/May/2014:15:09:32 +0800 start since:????????? 338 requests:???????????? 62 request duration:???? 1025585 request method:?????? GET request URI:????????? /index.php content length:?????? 0 user:???????????????? - script:?????????????? /data/site/www.ttlsa.com/index.php last request cpu:???? 45.83 last request memory:? 24903680 .....省略几个PID....
原文地址:启用php-fpm状态详解, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

You can query the Docker container name by following the steps: List all containers (docker ps). Filter the container list (using the grep command). Gets the container name (located in the "NAMES" column).

How to configure Nginx in Windows? Install Nginx and create a virtual host configuration. Modify the main configuration file and include the virtual host configuration. Start or reload Nginx. Test the configuration and view the website. Selectively enable SSL and configure SSL certificates. Selectively set the firewall to allow port 80 and 443 traffic.

How to confirm whether Nginx is started: 1. Use the command line: systemctl status nginx (Linux/Unix), netstat -ano | findstr 80 (Windows); 2. Check whether port 80 is open; 3. Check the Nginx startup message in the system log; 4. Use third-party tools, such as Nagios, Zabbix, and Icinga.

How to configure an Nginx domain name on a cloud server: Create an A record pointing to the public IP address of the cloud server. Add virtual host blocks in the Nginx configuration file, specifying the listening port, domain name, and website root directory. Restart Nginx to apply the changes. Access the domain name test configuration. Other notes: Install the SSL certificate to enable HTTPS, ensure that the firewall allows port 80 traffic, and wait for DNS resolution to take effect.

Docker container startup steps: Pull the container image: Run "docker pull [mirror name]". Create a container: Use "docker create [options] [mirror name] [commands and parameters]". Start the container: Execute "docker start [Container name or ID]". Check container status: Verify that the container is running with "docker ps".

Create a container in Docker: 1. Pull the image: docker pull [mirror name] 2. Create a container: docker run [Options] [mirror name] [Command] 3. Start the container: docker start [Container name]

The methods that can query the Nginx version are: use the nginx -v command; view the version directive in the nginx.conf file; open the Nginx error page and view the page title.

Starting an Nginx server requires different steps according to different operating systems: Linux/Unix system: Install the Nginx package (for example, using apt-get or yum). Use systemctl to start an Nginx service (for example, sudo systemctl start nginx). Windows system: Download and install Windows binary files. Start Nginx using the nginx.exe executable (for example, nginx.exe -c conf\nginx.conf). No matter which operating system you use, you can access the server IP
