From: Stefan Fritsch Date: Sat, 20 Aug 2016 20:21:39 +0000 (+0000) Subject: mod_status: note stopping procs in async info table X-Git-Tag: 2.5.0-alpha~1228 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bde49740f35e44e0d15e6be46f51d5666797286;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757029 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 00fc3d47ce6..44996c6ba9e 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -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\n" "" "" + "" "\n" "" "\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, "" + "" "" "" "" "\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, "" + ap_rprintf(r, "" + "" "" "" "" "\n
SlotPIDStoppingConnectionsThreadsAsync connections
%u%" APR_PID_T_FMT "%s%s%u%s%u%u%u%u%u
 Sum
Sum%d%d%d %d%d%d%d%d
\n", + procs, stopping, connections, busy_workers, idle_workers, write_completion, keep_alive, lingering_close);