File: status.xml

package info (click to toggle)
php-doc 20250827~git.abe740d%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 71,968 kB
  • sloc: xml: 985,760; php: 25,504; javascript: 671; sh: 177; makefile: 37
file content (322 lines) | stat: -rw-r--r-- 9,525 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<sect1 xml:id="fpm.status" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <title>Status Page</title>
 
 <para>
  This page provides information on the setup and contents of the FPM status page. See also
  <function>fpm_get_status</function>.
 </para>

 <sect2 xml:id="fpm.status.configuration">
  <title>Configuration</title>
  
  <para>
   The FPM status page can be enabled by setting the
   <link linkend="pm.status-path">pm.status_path</link> configuration parameter in the FPM pool
   configuration.
  </para>

  <caution>
   <para>
    For security the FPM status page should be restricted to internal requests or known client IPs
    only as the page reveals request URLs and information about available resources.
   </para>
  </caution>
  
  <para>
   Depending on the web server configuration it might be needed to configure the web server to
   allow requests directly to this path, bypassing any PHP scripts. An example of a configuration
   for Apache with FPM listening on UDS and <literal>pm.status_path</literal> set to
   <literal>/fpm-status</literal> would look like:
  </para>

  <informalexample>
   <programlisting role="apache-conf">
    <![CDATA[
<LocationMatch "/fpm-status">
 Order Allow,Deny
 Allow from 127.0.0.1
 ProxyPass "unix:/var/run/php-fpm.sock|fcgi://localhost/fpm-status"
</LocationMatch>
]]>
   </programlisting>
  </informalexample>

  <para>
   After reloading or restarting both FPM and the web server the status page will be accessible from
   the browser (as long as the request comes from an allowed IP address if the IP restriction was
   configured).
  </para>
 </sect2>

 <sect2 xml:id="fpm.status.parameters">
  <title>Query Parameters</title>

  <para>
   The format of the status page output can be altered by specifying one of the following query
   parameters:
  </para>
  
  <simplelist>
   <member><literal>html</literal></member>
   <member><literal>json</literal></member>
   <member><literal>openmetrics</literal></member>
   <member><literal>xml</literal></member>
  </simplelist>

  <para>
   Additional information can also be returned using the <literal>full</literal> query parameter.
  </para>
  
  <para>
   Example status page URLs:
  </para>
  
  <simplelist>
   <member>
    <literal>https://localhost/fpm-status</literal>
    - Brief output in the default text format
   </member>
   <member>
    <literal>https://localhost/fpm-status?full</literal>
    - Full output in the default text format
   </member>
   <member>
    <literal>https://localhost/fpm-status?json</literal>
    - Brief output in JSON format
   </member>
   <member>
    <literal>https://localhost/fpm-status?html&amp;full</literal>
    - Full output in HTML format
   </member>
  </simplelist>
 </sect2>
 
 <sect2 xml:id="fpm.status.contents">
  <title>Displayed Information</title>

  <para>
   Date/Time values use the unix timestamp format in JSON and XML output, otherwise they use
   the format resulting in the following example date
   <literal>"03/Jun/2021:07:21:46 +0100"</literal>.
  </para>
  
  <table>
   <title>Basic information - Always displayed on the status page</title>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>Parameter</entry>
      <entry>Description</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>pool</entry>
      <entry>The name of the FPM process pool.</entry>
     </row>
     <row>
      <entry>proccess manager</entry>
      <entry>The process manager type - static, dynamic or ondemand.</entry>
     </row>
     <row>
      <entry>start time</entry>
      <entry>The date/time that the process pool was last started.</entry>
     </row>
     <row>
      <entry>start since</entry>
      <entry>The time in seconds since the process pool was last started.</entry>
     </row>
     <row>
      <entry>accepted conn</entry>
      <entry>The total number of accepted connections.</entry>
     </row>
     <row>
      <entry>listen queue</entry>
      <entry>The number of requests (backlog) currently waiting for a free process.</entry>
     </row>
     <row>
      <entry>max listen queue</entry>
      <entry>The maximum number of requests seen in the listen queue at any one time.</entry>
     </row>
     <row>
      <entry>listen queue len</entry>
      <entry>The maximum allowed size of the listen queue.</entry>
     </row>
     <row>
      <entry>idle processes</entry>
      <entry>The number of processes that are currently idle (waiting for requests).</entry>
     </row>
     <row>
      <entry>active processes</entry>
      <entry>The number of processes that are currently processing requests.</entry>
     </row>
     <row>
      <entry>total processes</entry>
      <entry>The current total number of processes.</entry>
     </row>
     <row>
      <entry>max active processes</entry>
      <entry>The maximum number of concurrently active processes.</entry>
     </row>
     <row>
      <entry>max children reached</entry>
      <entry>
       Has the maximum number of processes ever been reached? If so the displayed value is greater than or equal to
       <literal>1</literal> otherwise the value is <literal>0</literal>.
      </entry>
     </row>
     <row>
      <entry>slow requests</entry>
      <entry>
       The total number of requests that have hit the configured
       <literal>request_slowlog_timeout</literal>.
      </entry>
     </row>
     <row>
      <entry>memory peak</entry>
      <entry>
       The memory usage peak since FPM started.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <table>
   <title>Per-process information - only displayed in <literal>full</literal> output mode</title>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>Parameter</entry>
      <entry>Description</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>pid</entry>
      <entry>The system PID of the process.</entry>
     </row>
     <row>
      <entry>state</entry>
      <entry>The state of the process - Idle, Running, ...</entry>
     </row>
     <row>
      <entry>start time</entry>
      <entry>The date/time at which the process started.</entry>
     </row>
     <row>
      <entry>start since</entry>
      <entry>The number of seconds since the process started.</entry>
     </row>
     <row>
      <entry>requests</entry>
      <entry>The total number of requests served.</entry>
     </row>
     <row>
      <entry>request duration</entry>
      <entry>The total time in microseconds spent serving last request.</entry>
     </row>
     <row>
      <entry>request method</entry>
      <entry>The HTTP method of the last served request.</entry>
     </row>
     <row>
      <entry>request uri</entry>
      <entry>
       The URI of the last served request (after webserver processing, it may always be
       <literal>/index.php</literal> if you use a front controller pattern redirect).
      </entry>
     </row>
     <row>
      <entry>content length</entry>
      <entry>The length of the request body, in bytes, of the last request.</entry>
     </row>
     <row>
      <entry>user</entry>
      <entry>The HTTP user (<literal>PHP_AUTH_USER</literal>) of the last request.</entry>
     </row>
     <row>
      <entry>script</entry>
      <entry>
       The full path of the script executed by the last request. This will be
       <literal>'-'</literal> if not applicable (eg. status page requests).
      </entry>
     </row>
     <row>
      <entry>last request cpu</entry>
      <entry>
       The %cpu of the last request. This will be 0 if the process is not Idle because the
       calculation is done when the request processing is complete. 
       The value can exceed 100%, because metric will tell which percentage of the total cpu time was used in the last request - 
       takes processes on all cores into account, whereas the 100% is for one core only.
      </entry>
     </row>
     <row>
      <entry>last request memory</entry>
      <entry>
       The maximum amount of memory consumed by the last request. This will be 0 if the process is
       not Idle because the calculation is done when the request processing is complete.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <note>
   <para>
    All values are specific to the pool and are reset when FPM is restarted.
   </para>
  </note>

  <note>
   <para>
    OpenMetrics format output uses different parameter types to better suit the OpenMetrics format.
    The parameters and descriptions of their values are included in the OpenMetrics format output.
   </para>
  </note>
 </sect2>

 <sect2 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     <row>
      <entry>8.1.0</entry>
      <entry>The openmetrics format was added.</entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </sect2>
</sect1>

 <!-- Keep this comment at the end of the file
 Local variables:
 mode: sgml
 sgml-omittag:t
 sgml-shorttag:t
 sgml-minimize-attributes:nil
 sgml-always-quote-attributes:t
 sgml-indent-step:1
 sgml-indent-data:t
 indent-tabs-mode:nil
 sgml-parent-document:nil
 sgml-default-dtd-file:"~/.phpdoc/manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil
 End:
 vim600: syn=xml fen fdm=syntax fdl=2 si
 vim: et tw=78 syn=sgml
 vi: ts=1 sw=1
 -->