mod_status: Complete the data shown for async
authorRainer Jung <rjung@apache.org>
Wed, 29 Aug 2018 02:23:36 +0000 (02:23 +0000)
committerRainer Jung <rjung@apache.org>
Wed, 29 Aug 2018 02:23:36 +0000 (02:23 +0000)
MPMs in "auto" mode.  Added number of processes,
number of stopping processes and number
of busy and idle workers.

This changes only the key/value list of the
server-status "auto" output. The data is already
part of the "html" output.

Backport of r1837589 from trunk.

Submitted by: rjung
Reviewed by: rjung, jim, ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1839530 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/generators/mod_status.c

diff --git a/CHANGES b/CHANGES
index 92c63d69f02abb238a03a88a1f7974966153f536..01ad3f493151892ed7ce3dfc1c38c4afb804e2b6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.35
 
+  *) mod_status: Complete the data shown for async MPMs in "auto" mode.
+     Added number of processes, number of stopping processes and number
+     of busy and idle workers.  [Rainer Jung]
+
   *) mod_ratelimit: Don't interfere with "chunked" encoding, fixing regression
      introduced in 2.4.34.  PR 62568.  [Yann Ylavic]
 
diff --git a/STATUS b/STATUS
index 9a3cf729f923040316712a85d184bb043ccded86..15ddbe762ff17fe272bd2b46371eb9231d44c705 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -156,15 +156,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
                    (adjust CHANGES)
       +1: rjung, jim, ylavic
 
-   *) mod_status: Complete the data shown for async
-      MPMs in "auto" mode.  Added number of processes,
-      number of stopping processes and number
-      of busy and idle workers.
-      trunk: http://svn.apache.org/r1837589
-      2.4.x patch: svn merge -c 1837589 ^/httpd/httpd/trunk . 
-                   (adjust CHANGES)
-      +1: rjung, jim, ylavic
-
    *) mod_status: Add cumulated response duration time
       in milliseconds.
       trunk: http://svn.apache.org/r1837590
index 12801f94ceccb79cbe3dd0b9524e8f86a3f11715..4085924ada827e8f0b1758c3420305ba2b23bb72 100644 (file)
@@ -557,16 +557,18 @@ static int status_handler(request_rec *r)
                 lingering_close  += ps_record->lingering_close;
                 busy_workers     += thread_busy_buffer[i];
                 idle_workers     += thread_idle_buffer[i];
+                procs++;
+                if (ps_record->quiescing) {
+                    stopping++;
+                }
                 if (!short_report) {
                     const char *dying = "no";
                     const char *old = "";
                     if (ps_record->quiescing) {
                         dying = "yes";
-                        stopping++;
                     }
                     if (ps_record->generation != mpm_generation)
                         old = " (old gen)";
-                    procs++;
                     ap_rprintf(r, "<tr><td>%u</td><td>%" APR_PID_T_FMT "</td>"
                                       "<td>%s%s</td>"
                                       "<td>%u</td><td>%s</td>"
@@ -598,12 +600,18 @@ static int status_handler(request_rec *r)
                           write_completion, keep_alive, lingering_close);
         }
         else {
-            ap_rprintf(r, "ConnsTotal: %d\n"
+            ap_rprintf(r, "Processes: %d\n"
+                          "Stopping: %d\n"
+                          "BusyWorkers: %d\n"
+                          "IdleWorkers: %d\n"
+                          "ConnsTotal: %d\n"
                           "ConnsAsyncWriting: %d\n"
                           "ConnsAsyncKeepAlive: %d\n"
                           "ConnsAsyncClosing: %d\n",
-                       connections, write_completion, keep_alive,
-                       lingering_close);
+                          procs, stopping,
+                          busy_workers, idle_workers,
+                          connections,
+                          write_completion, keep_alive, lingering_close);
         }
     }