<code><span># cat /usr/local/php-5.5.10/etc/php-fpm.conf | grep status_path</span> pm.status_path = /status</code>
<code>server { listen *:<span>80</span> default_server; server_name _; location ~ ^/(status|ping)$ { <span><strong>include</strong></span> fastcgi_params; fastcgi_pass <span>127.0</span><span>.0</span><span>.1</span>:<span>9000</span>; fastcgi_param SCRIPT_FILENAME <span>$fastcgi_script_name</span>; } }</code>
listen queue
– 请求等待<strong>队列</strong>,如果这个值不为0,那么要增加FPM的进程数量
アイドルプロセス – アイドルプロセスの数 max children reached
- 大道进程最大数量限制的次数,如果这个数量不为0,那说明你的最大进程数量太小了,请改大一点。
組み合わせ。 <code>service nginx restart service php<span>-fpm</span> restart</code>
json
、xml
、html
并且前面三个参数可以分别和full
6.2 xml<code><span># curl http://www.ttlsa.com/status</span> pool: www process manager: dynamic start time: <span>14</span>/May/<span>2014</span>:<span>22</span>:<span>40</span>:<span>15</span> +<span>0800</span> start since: <span>58508</span> accepted conn: <span>33</span> listen queue: <span>0</span> max listen queue: <span>8</span> listen queue len: <span>0</span> idle processes: <span>2</span> active processes: <span>1</span> total processes: <span>3</span> max active processes: <span>5</span> max children reached: <span>0</span> slow requests: <span>2091</span></code>
<code># curl http://<span>127.0</span><span>.0</span><span>.1</span>/status?json {"<span>pool</span>":<span><span>"www"</span></span>,"<span>process manager</span>":<span><span>"dynamic"</span></span>,"<span>start time</span>":<span><span>1400078415</span></span>,"<span>start since</span>":<span><span>59624</span></span>,"<span>accepted conn</span>":<span><span>27</span></span>,"<span>listen queue</span>":<span><span>0</span></span>,"<span>max listen queue</span>":<span><span>8</span></span>,"<span>listen queue len</span>":<span><span>0</span></span>,"<span>idle processes</span>":<span><span>2</span></span>,"<span>active processes</span>":<span><span>1</span></span>,"<span>total processes</span>":<span><span>3</span></span>,"<span>max active processes</span>":<span><span>5</span></span>,"<span>max children reached</span>":<span><span>0</span></span>,"<span>slow requests</span>":<span><span>2145</span></span>}</code>
<code># curl http://127.0.0.1/status?xml <span><?xml version="1.0" ?></span><span><<span>status</span>></span><span><<span>pool</span>></span>www<span></<span>pool</span>></span><span><<span>process-manager</span>></span>dynamic<span></<span>process-manager</span>></span><span><<span>start-time</span>></span>1400078415<span></<span>start-time</span>></span><span><<span>start-since</span>></span>59640<span></<span>start-since</span>></span><span><<span>accepted-conn</span>></span>36<span></<span>accepted-conn</span>></span><span><<span>listen-queue</span>></span>0<span></<span>listen-queue</span>></span><span><<span>max-listen-queue</span>></span>8<span></<span>max-listen-queue</span>></span><span><<span>listen-queue-len</span>></span>0<span></<span>listen-queue-len</span>></span><span><<span>idle-processes</span>></span>2<span></<span>idle-processes</span>></span><span><<span>active-processes</span>></span>1<span></<span>active-processes</span>></span><span><<span>total-processes</span>></span>3<span></<span>total-processes</span>></span><span><<span>max-active-processes</span>></span>5<span></<span>max-active-processes</span>></span><span><<span>max-children-reached</span>></span>0<span></<span>max-children-reached</span>></span><span><<span>slow-requests</span>></span>2145<span></<span>slow-requests</span>></span></code>