You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2005/05/15 13:23:50 UTC
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_lb_worker.c jk_shm.h jk_status.c
mturk 2005/05/15 04:23:50
Modified: jk/native/common jk_lb_worker.c jk_shm.h jk_status.c
Log:
Add max_busy count to give the user an option to see what was
the maximum number of concurrent connections to Tomcat.
Revision Changes Path
1.84 +5 -1 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.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- jk_lb_worker.c 10 May 2005 09:23:33 -0000 1.83
+++ jk_lb_worker.c 15 May 2005 11:23:50 -0000 1.84
@@ -578,7 +578,11 @@
end->rd = end->wr = 0;
/* Increment the number of workers serving request */
p->worker->s->busy++;
+ if (p->worker->s->busy > p->worker->s->max_busy)
+ p->worker->s->max_busy = p->worker->s->busy;
rec->s->busy++;
+ if (rec->s->busy > rec->s->max_busy)
+ rec->s->max_busy = rec->s->busy;
service_stat = end->service(end, s, l, &is_service_error);
/* Update partial reads and writes if any */
rec->s->readed += end->rd;
1.20 +3 -1 jakarta-tomcat-connectors/jk/native/common/jk_shm.h
Index: jk_shm.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_shm.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- jk_shm.h 26 Apr 2005 15:28:18 -0000 1.19
+++ jk_shm.h 15 May 2005 11:23:50 -0000 1.20
@@ -56,6 +56,8 @@
int id;
/* Number of currently busy channels */
volatile int busy;
+ /* Maximum number of busy channels */
+ volatile int max_busy;
/* worker name */
char name[JK_SHM_STR_SIZ+1];
/* worker domain */
1.39 +5 -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.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- jk_status.c 26 Apr 2005 15:28:18 -0000 1.38
+++ jk_status.c 15 May 2005 11:23:50 -0000 1.39
@@ -447,7 +447,7 @@
jk_puts(s, "<table><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>Busy</th><th>RR</th><th>Cd</th></tr>\n");
+ "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</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;
@@ -478,6 +478,7 @@
jk_putv(s, "<td>", status_strfsize(wr->s->readed, buf),
"</td>", NULL);
jk_printf(s, "<td>%u</td><td>", wr->s->busy);
+ jk_printf(s, "<td>%u</td><td>", wr->s->max_busy);
if (wr->s->redirect && *wr->s->redirect)
jk_puts(s, wr->s->redirect);
else
@@ -581,6 +582,8 @@
"<tr><th>Err</th><td>Number of failed requests</td></tr>\n"
"<tr><th>Wr</th><td>Number of bytes transferred</td></tr>\n"
"<tr><th>Rd</th><td>Number of bytes read</td></tr>\n"
+ "<tr><th>Busy</th><td>Current number of busy connections</td></tr>\n"
+ "<tr><th>Max</th><td>Maximum number of busy connections</td></tr>\n"
"<tr><th>RR</th><td>Route redirect</td></tr>\n"
"<tr><th>Cd</th><td>Cluster domain</td></tr>\n"
"</table>");
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org