summaryrefslogtreecommitdiffstats
path: root/modules/generators
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2011-04-27 12:31:06 +0200
committerJeff Trawick <trawick@apache.org>2011-04-27 12:31:06 +0200
commit6d7fe15c43df4eb629317e7fb672ba4014f632de (patch)
treef80cf1d60704cb9695f5dc3255cb6a2df8ee7345 /modules/generators
parentFix double free in out-of-mem situation (diff)
downloadapache2-6d7fe15c43df4eb629317e7fb672ba4014f632de.tar.xz
apache2-6d7fe15c43df4eb629317e7fb672ba4014f632de.zip
Follow on to 1057048:
In the map of active workers, don't print spaces for scoreboard slots which aren't used due to ThreadsPerChild < ThreadLimit or MaxClients/ThreadsPerChild < ServerLimit; simply omit those slots from the display. Workers in those slots which are gracefully exiting (from a previous generation with a different MPM config) will be displayed, and the map will shrink as those workers exit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1097070 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/generators')
-rw-r--r--modules/generators/mod_status.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c
index 7a816b2568..8e2c22e33a 100644
--- a/modules/generators/mod_status.c
+++ b/modules/generators/mod_status.c
@@ -183,7 +183,7 @@ static int status_handler(request_rec *r)
const char *loc;
apr_time_t nowtime;
apr_interval_time_t up_time;
- int j, i, res;
+ int j, i, res, written;
int ready;
int busy;
unsigned long count;
@@ -470,13 +470,17 @@ static int status_handler(request_rec *r)
else
ap_rputs("Scoreboard: ", r);
+ written = 0;
for (i = 0; i < server_limit; ++i) {
for (j = 0; j < thread_limit; ++j) {
int indx = (i * thread_limit) + j;
- ap_rputc(stat_buffer[indx], r);
- if ((indx % STATUS_MAXLINE == (STATUS_MAXLINE - 1))
- && !short_report)
- ap_rputs("\n", r);
+ if (stat_buffer[indx] != status_flags[SERVER_DISABLED]) {
+ ap_rputc(stat_buffer[indx], r);
+ if ((written % STATUS_MAXLINE == (STATUS_MAXLINE - 1))
+ && !short_report)
+ ap_rputs("\n", r);
+ written++;
+ }
}
}
@@ -496,7 +500,6 @@ static int status_handler(request_rec *r)
ap_rputs("\"<b><code>G</code></b>\" Gracefully finishing,<br /> \n", r);
ap_rputs("\"<b><code>I</code></b>\" Idle cleanup of worker, \n", r);
ap_rputs("\"<b><code>.</code></b>\" Open slot with no current process,<br />\n", r);
- ap_rputs("\"<b><code> </code></b>\" Slot disabled by MaxClients setting</p>\n", r);
ap_rputs("<p />\n", r);
if (!ap_extended_status) {
int j;