From c2f0914c754c0c0ea01ea255828ceb3c206cce52 Mon Sep 17 00:00:00 2001 From: Mladen Turk Date: Thu, 16 Sep 2004 14:02:16 +0000 Subject: [PATCH] Display worker status under server-status git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105172 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index b58e0512b7..8177972d9d 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -721,8 +721,8 @@ static int proxy_handler(request_rec *r) url, NULL, 0)) == OK) break; - } while (!PROXY_WORKER_IS_USABLE(worker) && - max_attempts > attempts++); + } while (!PROXY_WORKER_IS_USABLE(worker) && + max_attempts > attempts++); if (DECLINED == access_status) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server, @@ -1731,7 +1731,7 @@ static int proxy_status_hook(request_rec *r, int flags) apr_time_sec(balancer->timeout)); ap_rputs("\n", r); ap_rputs("\n\n" - "" + "" "" "" "\n", r); @@ -1740,8 +1740,16 @@ static int proxy_status_hook(request_rec *r, int flags) for (n = 0; n < balancer->workers->nelts; n++) { ap_rvputs(r, "\n", NULL); - ap_rvputs(r, "", NULL); - ap_rvputs(r, "", worker->s->lbfactor); ap_rprintf(r, "\n" "\n" "\n" + "\n" "\n" "\n" "\n" -- 2.40.0
SchHostSchHostStatRouteRedirFAccWrRd
", worker->w->scheme, "", worker->w->hostname, "", worker->w->route, NULL); + ap_rvputs(r, "", worker->w->hostname, "", NULL); + if (worker->w->status & PROXY_WORKER_DISABLED) + ap_rputs("Dis", r); + else if (worker->w->status & PROXY_WORKER_IN_ERROR) + ap_rputs("Err", r); + else if (worker->w->status & PROXY_WORKER_INITIALIZED) + ap_rputs("Ok", r); + else + ap_rputs("-", r); + ap_rvputs(r, "", worker->w->route, NULL); ap_rvputs(r, "", worker->w->redirect, NULL); ap_rprintf(r, "%.2f%d", (int)(worker->s->elected)); @@ -1763,6 +1771,7 @@ static int proxy_status_hook(request_rec *r, int flags) "
TimeoutBalancer Timeout
SchConnection scheme
HostBackend Hostname
StatWorker status
RouteSession Route
RedirSession Route Redirection
FLoad Balancer Factor in %