mturk       2005/02/17 05:41:04

  Modified:    jk/native/common jk_lb_worker.c jk_status.c
  Log:
  Display the number of workers currently serving requests.
  
  Revision  Changes    Path
  1.61      +6 -2      jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c
  
  Index: jk_lb_worker.c
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- jk_lb_worker.c    17 Feb 2005 12:29:00 -0000      1.60
  +++ jk_lb_worker.c    17 Feb 2005 13:41:04 -0000      1.61
  @@ -547,12 +547,16 @@
                       /* Reset endpoint read and write sizes for
                        * this request.
                        */
  -                    end->rd = end->wr = 0;                    
  +                    end->rd = end->wr = 0;
  +                    /* Increment the number of workers serving request */
  +                    p->worker->s->busy++;
                       service_ok = end->service(end, s, l, &is_service_error);
                       /* Update partial reads and writes if any */
                       rec->s->readed += end->rd;
                       rec->s->transferred += end->wr;
                       end->done(&end, l);
  +                    /* Decrement the busy worker count */
  +                    p->worker->s->busy--;
                       if (service_ok) {
                           rec->s->in_error_state = JK_FALSE;
                           rec->s->in_recovering = JK_FALSE;
  
  
  
  1.17      +3 -2      jakarta-tomcat-connectors/jk/native/common/jk_status.c
  
  Index: jk_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_status.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- jk_status.c       17 Feb 2005 09:12:24 -0000      1.16
  +++ jk_status.c       17 Feb 2005 13:41:04 -0000      1.17
  @@ -356,7 +356,7 @@
               jk_puts(s, "<table border=\"0\"><tr>"
                       "<th>Name</th><th>Type</th><th>Host</th><th>Addr</th>"
                       
"<th>Stat</th><th>F</th><th>V</th><th>Acc</th><th>Err</th>"
  -                    "<th>Wr</th><th>Rd</th><th>RR</th><th>Cd</th></tr>\n");
  +                    
"<th>Wr</th><th>Rd</th><th>Busy</th><th>RR</th><th>Cd</th></tr>\n");
               for (j = 0; j < lb->num_of_workers; j++) {
                   worker_record_t *wr = &(lb->lb_workers[j]);
                   ajp_worker_t *a = (ajp_worker_t *)wr->w->worker_private;
  @@ -384,6 +384,7 @@
                           "</td>", NULL);
                   jk_putv(s, "<td>", status_strfsize(wr->s->readed, buf),
                           "</td><td>", NULL);
  +                jk_printf(s, "<td>%u</td>", wr->s->busy);
                   jk_puts(s, wr->s->redirect);
                   jk_puts(s, "</td><td>\n");
                   jk_puts(s, wr->s->domain);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to