# HG changeset patch # User Ruslan Ermilov # Date 1360571177 -14400 # Node ID d1b5814e52652dfebfd74a178958576f676f09e8 # Parent 6678b1f27514cb6766e072be4d14b095946d888e Controlling nginx: use "ps -w" in examples. diff -r 6678b1f27514 -r d1b5814e5265 xml/en/docs/control.xml --- a/xml/en/docs/control.xml Mon Feb 11 11:44:48 2013 +0400 +++ b/xml/en/docs/control.xml Mon Feb 11 12:26:17 2013 +0400 @@ -8,7 +8,7 @@
+ rev="3">
@@ -81,12 +81,12 @@ Let’s illustrate this by example. Imagine that nginx is run on FreeBSD 4.x and the command -ps ax -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)' +ps axw -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)' produces the following output: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 33127 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) 33128 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) 33129 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -97,8 +97,8 @@ If HUP is sent to the master process, the output becomes: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -33129 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +33129 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (nginx) 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) @@ -110,7 +110,7 @@ After some time it exits: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) @@ -151,11 +151,11 @@ worker processes: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -179,9 +179,9 @@ down gracefully, and they will start to exit: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -33135 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +33135 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (nginx) +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -201,8 +201,8 @@ After some time, only the new worker processes will process requests: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -252,7 +252,7 @@ the QUIT signal, and only new processes will stay: PID PPID USER %CPU VSZ WCHAN COMMAND -36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) diff -r 6678b1f27514 -r d1b5814e5265 xml/ru/docs/control.xml --- a/xml/ru/docs/control.xml Mon Feb 11 11:44:48 2013 +0400 +++ b/xml/ru/docs/control.xml Mon Feb 11 12:26:17 2013 +0400 @@ -8,7 +8,7 @@
+ rev="3">
@@ -74,12 +74,12 @@ Предположим, на FreeBSD 4.x команда -ps ax -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)' +ps axw -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)' показывает примерно такую картину: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 33127 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) 33128 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) 33129 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -90,8 +90,8 @@ Если послать сигнал HUP главному процессу, то картина может быть такой: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -33129 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +33129 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (nginx) 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) @@ -103,7 +103,7 @@ некоторого времени он завершается: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) @@ -143,11 +143,11 @@ очередь—свои рабочие процессы: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) 33135 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -170,9 +170,9 @@ рабочим процессам сообщение о плавном выходе, и они будут постепенно выходить: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -33135 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +33135 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (nginx) +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -192,8 +192,8 @@ По истечении времени запросы будут обрабатывать только новые рабочие процессы: PID PPID USER %CPU VSZ WCHAN COMMAND -33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb -36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sbin/nginx +36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) @@ -243,7 +243,7 @@ QUIT, и останутся только новые процессы: PID PPID USER %CPU VSZ WCHAN COMMAND -36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb +36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sbin/nginx 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx)