From 28d22a5da887b9fcb79d65a3fc647108c947e78d Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Wed, 29 Aug 2018 02:23:36 +0000 Subject: [PATCH] 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. 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 | 4 ++++ STATUS | 9 --------- modules/generators/mod_status.c | 18 +++++++++++++----- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index 92c63d69f0..01ad3f4931 100644 --- 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 9a3cf729f9..15ddbe762f 100644 --- 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 diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 12801f94ce..4085924ada 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -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, "%u%" APR_PID_T_FMT "" "%s%s" "%u%s" @@ -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); } } -- 2.50.1