changeset 1260:6e34b5716bdb

Documented the stub_status module.
author Yaroslav Zhuravlev <yar@nginx.com>
date Mon, 21 Jul 2014 13:38:41 +0400
parents 954dcc02cb63
children e698e71d8e7f
files xml/en/GNUmakefile xml/en/docs/http/ngx_http_stub_status_module.xml xml/en/docs/index.xml xml/ru/GNUmakefile xml/ru/docs/http/ngx_http_stub_status_module.xml xml/ru/docs/index.xml
diffstat 6 files changed, 327 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/GNUmakefile
+++ b/xml/en/GNUmakefile
@@ -76,6 +76,7 @@ REFS =									\
 		http/ngx_http_ssi_module				\
 		http/ngx_http_ssl_module				\
 		http/ngx_http_status_module				\
+		http/ngx_http_stub_status_module			\
 		http/ngx_http_sub_module				\
 		http/ngx_http_upstream_module				\
 		http/ngx_http_userid_module				\
new file mode 100644
--- /dev/null
+++ b/xml/en/docs/http/ngx_http_stub_status_module.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Yaroslav Zhuravlev
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Module ngx_http_stub_status_module"
+        link="/en/docs/http/ngx_http_stub_status_module.html"
+        lang="en"
+        rev="1">
+
+<section id="summary">
+
+<para>
+The <literal>ngx_http_stub_status_module</literal> module provides
+access to basic status information.
+</para>
+
+<para>
+This module is not built by default, it should be enabled with the
+<literal>--with-http_stub_status_module</literal>
+configuration parameter.
+</para>
+
+</section>
+
+
+<section id="example" name="Example Configuration">
+
+<para>
+<example>
+location /basic_status {
+    stub_status;
+}
+</example>
+This configuration creates a simple web page
+with basic status data which may look like as follows:
+<example>
+Active connections: 291
+server accepts handled requests
+  16630948 16630948 31070465
+Reading: 6 Writing: 179 Waiting: 106
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Directives">
+
+<directive name="stub_status">
+<syntax/>
+<default/>
+<context>location</context>
+
+<para>
+The basic status information will be accessible from the surrounding location.
+</para>
+
+</directive>
+
+</section>
+
+
+<section id="data" name="Data">
+
+<para>
+The following status information is provided:
+<list type="tag">
+
+<tag-name id="stubstat_active"><literal>Active connections</literal></tag-name>
+<tag-desc>
+The current number of active client connections
+including <literal>Waiting</literal> connections.
+</tag-desc>
+
+<tag-name id="stubstat_accepts"><literal>accepts</literal></tag-name>
+<tag-desc>
+The total number of accepted client connections.
+</tag-desc>
+
+<tag-name id="stubstat_handled"><literal>handled</literal></tag-name>
+<tag-desc>
+The total number of handled connections.
+Generally, the parameter value is the same as <literal>accepts</literal>
+unless some resource limits have been reached
+(for example, the
+<link doc="../ngx_core_module.xml" id="worker_connections"/> limit).
+</tag-desc>
+
+<tag-name id="stubstat_requests"><literal>requests</literal></tag-name>
+<tag-desc>
+The total number of client requests.
+</tag-desc>
+
+<tag-name id="stubstat_reading"><literal>Reading</literal></tag-name>
+<tag-desc>
+The current number of connections where nginx is reading the request header.
+</tag-desc>
+
+<tag-name id="stubstat_writing"><literal>Writing</literal></tag-name>
+<tag-desc>
+The current number of connections
+where nginx is writing the response back to the client.
+</tag-desc>
+
+<tag-name id="stubstat_waiting"><literal>Waiting</literal></tag-name>
+<tag-desc>
+The current number of idle client connections waiting for a request.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+
+<section id="variables" name="Embedded Variables">
+
+<para>
+The <literal>ngx_http_stub_status_module</literal> module
+supports the following embedded variables (1.3.14):
+<list type="tag">
+
+<tag-name
+id="var_connections_active"><var>$connections_active</var></tag-name>
+<tag-desc>
+same as the <literal>Active connections</literal> value;
+</tag-desc>
+
+<tag-name
+id="var_connections_reading"><var>$connections_reading</var></tag-name>
+<tag-desc>
+same as the <literal>Reading</literal> value;
+</tag-desc>
+
+<tag-name
+id="var_connections_writing"><var>$connections_writing</var></tag-name>
+<tag-desc>
+same as the <literal>Writing</literal> value;
+</tag-desc>
+
+<tag-name
+id="var_connections_waiting"><var>$connections_waiting</var></tag-name>
+<tag-desc>
+same as the <literal>Waiting</literal> value.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+</module>
--- a/xml/en/docs/index.xml
+++ b/xml/en/docs/index.xml
@@ -373,6 +373,11 @@ ngx_http_status_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_stub_status_module.xml">
+ngx_http_stub_status_module</link>
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_sub_module.xml">
 ngx_http_sub_module</link>
 </listitem>
--- a/xml/ru/GNUmakefile
+++ b/xml/ru/GNUmakefile
@@ -65,6 +65,7 @@ REFS =									\
 		http/ngx_http_ssi_module				\
 		http/ngx_http_ssl_module				\
 		http/ngx_http_status_module				\
+		http/ngx_http_stub_status_module			\
 		http/ngx_http_sub_module				\
 		http/ngx_http_upstream_module				\
 		http/ngx_http_userid_module				\
new file mode 100644
--- /dev/null
+++ b/xml/ru/docs/http/ngx_http_stub_status_module.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright (C) Yaroslav Zhuravlev
+  Copyright (C) Nginx, Inc.
+  -->
+
+<!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
+
+<module name="Модуль ngx_http_stub_status_module"
+        link="/ru/docs/http/ngx_http_stub_status_module.html"
+        lang="ru"
+        rev="1">
+
+<section id="summary">
+
+<para>
+Модуль <literal>ngx_http_stub_status_module</literal> предоставляет
+доступ к базовой информации о состоянии сервера.
+</para>
+
+<para>
+По умолчанию этот модуль не собирается, его сборку необходимо
+разрешить с помощью конфигурационного параметра
+<literal>--with-http_stub_status_module</literal>.
+</para>
+
+</section>
+
+
+<section id="example" name="Пример конфигурации">
+
+<para>
+<example>
+location /basic_status {
+    stub_status;
+}
+</example>
+В данной конфигурации создаётся простая веб-страница
+с основной информацией о состоянии, которая может выглядеть следующим образом:
+<example>
+Active connections: 291
+server accepts handled requests
+  16630948 16630948 31070465
+Reading: 6 Writing: 179 Waiting: 106
+</example>
+</para>
+
+</section>
+
+
+<section id="directives" name="Директивы">
+
+<directive name="stub_status">
+<syntax/>
+<default/>
+<context>location</context>
+
+<para>
+Информация о состоянии будет доступна из данного location.
+</para>
+
+</directive>
+
+</section>
+
+
+<section id="data" name="Данные">
+
+<para>
+Доступна следующая информация:
+<list type="tag">
+
+<tag-name id="stubstat_active"><literal>Active connections</literal></tag-name>
+<tag-desc>
+Текущее число активных клиентских соединений,
+включая <literal>Waiting</literal>-соединения.
+</tag-desc>
+
+<tag-name id="stubstat_accepts"><literal>accepts</literal></tag-name>
+<tag-desc>
+Суммарное число принятых клиентских соединений.
+</tag-desc>
+
+<tag-name id="stubstat_handled"><literal>handled</literal></tag-name>
+<tag-desc>
+Суммарное число обработанных соединений.
+Как правило, значение этого параметра такое же, как <literal>accepts</literal>,
+если не достигнуто какое-нибудь системное ограничение
+(например, лимит
+<link doc="../ngx_core_module.xml" id="worker_connections"/>).
+</tag-desc>
+
+<tag-name id="stubstat_requests"><literal>requests</literal></tag-name>
+<tag-desc>
+Суммарное число клиентских запросов.
+</tag-desc>
+
+<tag-name id="stubstat_reading"><literal>Reading</literal></tag-name>
+<tag-desc>
+Текущее число соединений,
+в которых nginx в настоящий момент читает заголовок запроса.
+</tag-desc>
+
+<tag-name id="stubstat_writing"><literal>Writing</literal></tag-name>
+<tag-desc>
+Текущее число соединений,
+в которых nginx в настоящий момент отвечает клиенту.
+</tag-desc>
+
+<tag-name id="stubstat_waiting"><literal>Waiting</literal></tag-name>
+<tag-desc>
+Текущее число бездействующих клиентских соединений в ожидании запроса.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+
+<section id="variables" name="Встроенные переменные">
+
+<para>
+Модуль <literal>ngx_http_stub_status_module</literal>
+поддерживает следующие встроенные переменные (1.3.14):
+<list type="tag">
+
+<tag-name
+id="var_connections_active"><var>$connections_active</var></tag-name>
+<tag-desc>
+то же, что и значение <literal>Active connections</literal>;
+</tag-desc>
+
+<tag-name
+id="var_connections_reading"><var>$connections_reading</var></tag-name>
+<tag-desc>
+то же, что и значение <literal>Reading</literal>;
+</tag-desc>
+
+<tag-name
+id="var_connections_writing"><var>$connections_writing</var></tag-name>
+<tag-desc>
+то же, что и значение <literal>Writing</literal>;
+</tag-desc>
+
+<tag-name
+id="var_connections_waiting"><var>$connections_waiting</var></tag-name>
+<tag-desc>
+то же, что и значение <literal>Waiting</literal>.
+</tag-desc>
+
+</list>
+</para>
+
+</section>
+
+</module>
--- a/xml/ru/docs/index.xml
+++ b/xml/ru/docs/index.xml
@@ -347,6 +347,11 @@ ngx_http_status_module</link>
 </listitem>
 
 <listitem>
+<link doc="http/ngx_http_stub_status_module.xml">
+ngx_http_stub_status_module</link>
+</listitem>
+
+<listitem>
 <link doc="http/ngx_http_sub_module.xml">
 ngx_http_sub_module</link>
 </listitem>