httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1757029 - /httpd/httpd/trunk/modules/generators/mod_status.c
Date Sat, 20 Aug 2016 20:21:39 GMT
Author: sf
Date: Sat Aug 20 20:21:39 2016
New Revision: 1757029

URL: http://svn.apache.org/viewvc?rev=1757029&view=rev
Log:
mod_status: note stopping procs in async info table

* add new column "stopping", denoting if a process is shutting down
* add additional "(old gen)", if a process is from before a graceful reload
* add counts of processes and stopping processes to summary line


Modified:
    httpd/httpd/trunk/modules/generators/mod_status.c

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=1757029&r1=1757028&r2=1757029&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Sat Aug 20 20:21:39 2016
@@ -531,7 +531,7 @@ static int status_handler(request_rec *r
 
     if (is_async) {
         int write_completion = 0, lingering_close = 0, keep_alive = 0,
-            connections = 0;
+            connections = 0, stopping = 0, procs = 0;
         /*
          * These differ from 'busy' and 'ready' in how gracefully finishing
          * threads are counted. XXX: How to make this clear in the html?
@@ -541,6 +541,7 @@ static int status_handler(request_rec *r
             ap_rputs("\n\n<table rules=\"all\" cellpadding=\"1%\">\n"
                      "<tr><th rowspan=\"2\">Slot</th>"
                          "<th rowspan=\"2\">PID</th>"
+                         "<th rowspan=\"2\">Stopping</th>"
                          "<th colspan=\"2\">Connections</th>\n"
                          "<th colspan=\"2\">Threads</th>"
                          "<th colspan=\"3\">Async connections</th></tr>\n"
@@ -556,13 +557,24 @@ 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];
-                if (!short_report)
+                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>"
                                       "<td>%u</td><td>%u</td>"
                                       "<td>%u</td><td>%u</td><td>%u</td>"
                                       "</tr>\n",
                                i, ps_record->pid,
+                               dying, old,
                                ps_record->connections,
                                ps_record->not_accepting ? "no" : "yes",
                                thread_busy_buffer[i],
@@ -570,14 +582,17 @@ static int status_handler(request_rec *r
                                ps_record->write_completion,
                                ps_record->keep_alive,
                                ps_record->lingering_close);
+                }
             }
         }
         if (!short_report) {
-            ap_rprintf(r, "<tr><td>&nbsp;</td><td>Sum</td>"
+            ap_rprintf(r, "<tr><td>Sum</td>"
+                          "<td>%d</td><td>%d</td>"
                           "<td>%d</td><td>&nbsp;</td>"
                           "<td>%d</td><td>%d</td>"
                           "<td>%d</td><td>%d</td><td>%d</td>"
                           "</tr>\n</table>\n",
+                          procs, stopping,
                           connections,
                           busy_workers, idle_workers,
                           write_completion, keep_alive, lingering_close);



Mime
View raw message