1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

mod_status: don't include workers from dead or quiescing processes in the

"requests currently being processed" or "idle" counts

also, change term from "servers" to "workers" - servers sounds like what
you call the whole thing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89820 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Greg Ames
2001-07-31 05:35:06 +00:00
parent 828dc11281
commit d45e862714

View File

@@ -321,10 +321,15 @@ static int status_handler(request_rec *r)
ps_record = ap_scoreboard_image->parent[i]; ps_record = ap_scoreboard_image->parent[i];
res = ws_record.status; res = ws_record.status;
stat_buffer[indx] = status_flags[res]; stat_buffer[indx] = status_flags[res];
if (res == SERVER_READY) if (!ps_record.quiescing && ps_record.pid) {
ready++; if (res == SERVER_READY)
else if (res != SERVER_DEAD && res != SERVER_IDLE_KILL) ready++;
busy++; else if (res != SERVER_DEAD && res != SERVER_IDLE_KILL)
busy++;
}
/* XXX what about the counters for quiescing/seg faulted
* processes? should they be counted or not? GLA
*/
if (ap_extended_status) { if (ap_extended_status) {
lres = ws_record.access_count; lres = ws_record.access_count;
bytes = ws_record.bytes_served; bytes = ws_record.bytes_served;
@@ -432,10 +437,10 @@ static int status_handler(request_rec *r)
} /* ap_extended_status */ } /* ap_extended_status */
if (!short_report) if (!short_report)
ap_rprintf(r, "<dt>%d requests currently being processed, %d idle servers</dt>\n" ap_rprintf(r, "<dt>%d requests currently being processed, %d idle workers</dt>\n"
,busy, ready); ,busy, ready);
else else
ap_rprintf(r, "BusyServers: %d\nIdleServers: %d\n", busy, ready); ap_rprintf(r, "BusyWorkers: %d\nIdleWorkers: %d\n", busy, ready);
/* send the scoreboard 'table' out */ /* send the scoreboard 'table' out */