httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy mod_proxy.c
Date Thu, 16 Sep 2004 14:02:16 GMT
mturk       2004/09/16 07:02:16

  Modified:    modules/proxy mod_proxy.c
  Log:
  Display worker status under server-status
  
  Revision  Changes    Path
  1.146     +14 -5     httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.145
  retrieving revision 1.146
  diff -u -r1.145 -r1.146
  --- mod_proxy.c	16 Sep 2004 12:08:00 -0000	1.145
  +++ mod_proxy.c	16 Sep 2004 14:02:16 -0000	1.146
  @@ -721,8 +721,8 @@
                                                         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 @@
                      apr_time_sec(balancer->timeout));
           ap_rputs("</table>\n", r);
           ap_rputs("\n\n<table border=\"0\"><tr>"
  -                 "<th>Sch</th><th>Host</th>"
  +                 "<th>Sch</th><th>Host</th><th>Stat</th>"
                    "<th>Route</th><th>Redir</th>"
                    "<th>F</th><th>Acc</th><th>Wr</th><th>Rd</th>"
                    "</tr>\n", r);
  @@ -1740,8 +1740,16 @@
           for (n = 0; n < balancer->workers->nelts; n++) {
   
               ap_rvputs(r, "<tr>\n<td>", worker->w->scheme, "</td>",
NULL);
  -            ap_rvputs(r, "<td>", worker->w->hostname, "</td>", NULL);
  -            ap_rvputs(r, "<td>", worker->w->route, NULL);
  +            ap_rvputs(r, "<td>", worker->w->hostname, "</td><td>",
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, "</td><td>", worker->w->route, NULL);
               ap_rvputs(r, "</td><td>", worker->w->redirect, NULL);
               ap_rprintf(r, "</td><td>%.2f</td>", worker->s->lbfactor);
               ap_rprintf(r, "<td>%d</td><td>", (int)(worker->s->elected));
  @@ -1763,6 +1771,7 @@
                "<tr><th>Timeout</th><td>Balancer Timeout</td></tr>\n"
                "<tr><th>Sch</th><td>Connection scheme</td></tr>\n"
                "<tr><th>Host</th><td>Backend Hostname</td></tr>\n"
  +             "<tr><th>Stat</th><td>Worker status</td></tr>\n"
                "<tr><th>Route</th><td>Session Route</td></tr>\n"
                "<tr><th>Redir</th><td>Session Route Redirection</td></tr>\n"
                "<tr><th>F</th><td>Load Balancer Factor in %</td></tr>\n"
  
  
  

Mime
View raw message