ASF Bugzilla – Attachment 31929 Details for
Bug 56869
Add code to collect the maximum number of backend connections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add MxCon
mxcon.patch (text/plain), 6.42 KB, created by
Martin Knoblauch
on 2014-08-19 10:58:38 UTC
(
hide
)
Description:
Patch to add MxCon
Filename:
MIME Type:
Creator:
Martin Knoblauch
Created:
2014-08-19 10:58:38 UTC
Size:
6.42 KB
patch
obsolete
>diff -up workspace/mod_jk/native/common/jk_ajp_common.c common/jk_ajp_common.c >--- workspace/mod_jk/native/common/jk_ajp_common.c 2014-08-19 12:21:41.482639285 +0200 >+++ common/jk_ajp_common.c 2014-08-19 12:35:48.971260070 +0200 >@@ -1041,6 +1041,10 @@ int ajp_connect_to_endpoint(ajp_endpoint > return JK_FALSE; > } > ae->worker->s->connected++; >+ /* Update maximum number of connections >+ */ >+ if (ae->worker->s->connected > ae->worker->s->max_connected) >+ ae->worker->s->max_connected = ae->worker->s->connected; > /* set last_access only if needed > */ > if (ae->worker->cache_timeout > 0) >diff -up workspace/mod_jk/native/common/jk_shm.h common/jk_shm.h >--- workspace/mod_jk/native/common/jk_shm.h 2014-07-24 11:34:00.491471625 +0200 >+++ common/jk_shm.h 2014-08-19 12:31:58.082915741 +0200 >@@ -97,6 +97,8 @@ struct jk_shm_ajp_worker > /* current error state (runtime) of the worker */ > volatile int state; > /* Statistical data */ >+ /* Maximum number of connected channels */ >+ volatile int max_connected; > /* Number of currently connected channels */ > volatile int connected; > /* Number of currently busy channels */ >diff -up workspace/mod_jk/native/common/jk_status.c common/jk_status.c >--- workspace/mod_jk/native/common/jk_status.c 2014-07-24 11:34:00.498471696 +0200 >+++ common/jk_status.c 2014-08-19 12:32:06.162997834 +0200 >@@ -263,7 +263,7 @@ > "<th>State</th>" \ > "<th>Acc</th>" \ > "<th>Err</th><th>CE</th><th>RE</th>" \ >- "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</th><th>Con</th><th>LR</th><th>LE</th>" \ >+ "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</th><th>Con</th><th>MxCon</th><th>LR</th><th>LE</th>" \ > "</tr>\n" > #define JK_STATUS_SHOW_AJP_ROW "<tr>" \ > "<td>%s</td>" \ >@@ -277,6 +277,7 @@ > "<td>%d</td>" \ > "<td>%d</td>" \ > "<td>%d</td>" \ >+ "<td>%d</td>" \ > "<td>%s</td>" \ > "</tr>\n" > #define JK_STATUS_SHOW_LB_HEAD "<tr>" \ >@@ -308,7 +309,7 @@ > "<th>D</th><th>F</th><th>M</th>" \ > "<th>V</th><th>Acc</th><th>Sess</th>" \ > "<th>Err</th><th>CE</th><th>RE</th>" \ >- "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</th><th>Con</th>" \ >+ "<th>Wr</th><th>Rd</th><th>Busy</th><th>Max</th><th>Con</th><th>MxCon</th>" \ > "<th>" JK_STATUS_ARG_LBM_TEXT_ROUTE "</th>" \ > "<th>RR</th><th>Cd</th><th>Rs</th><th>LR</th><th>LE</th>" \ > "</tr>\n" >@@ -329,6 +330,7 @@ > "<td>%d</td>" \ > "<td>%d</td>" \ > "<td>%d</td>" \ >+ "<td>%d</td>" \ > "<td>%s</td>" \ > "<td>%s</td>" \ > "<td>%s</td>" \ >@@ -1849,6 +1851,7 @@ static void display_worker_ajp_details(j > aw->s->busy, > aw->s->max_busy, > aw->s->connected, >+ aw->s->max_connected, > wr->route, > wr->redirect ? (*wr->redirect ? wr->redirect : " ") : " ", > wr->domain ? (*wr->domain ? wr->domain : " ") : " ", >@@ -1871,6 +1874,7 @@ static void display_worker_ajp_details(j > aw->s->busy, > aw->s->max_busy, > aw->s->connected, >+ aw->s->max_connected, > delta_reset, > rc_time > 0 ? buf_time : " "); > } >@@ -1928,6 +1932,7 @@ static void display_worker_ajp_details(j > jk_print_xml_att_int(s, off+2, "busy", aw->s->busy); > jk_print_xml_att_int(s, off+2, "max_busy", aw->s->max_busy); > jk_print_xml_att_int(s, off+2, "connected", aw->s->connected); >+ jk_print_xml_att_int(s, off+2, "max_connected", aw->s->max_connected); > if (lb) { > jk_print_xml_att_int(s, off+2, "time_to_recover_min", rs_min); > jk_print_xml_att_int(s, off+2, "time_to_recover_max", rs_max); >@@ -1995,6 +2000,7 @@ static void display_worker_ajp_details(j > jk_printf(s, " busy=%d", aw->s->busy); > jk_printf(s, " max_busy=%d", aw->s->max_busy); > jk_printf(s, " connected=%d", aw->s->connected); >+ jk_printf(s, " max_connected=%d", aw->s->max_connected); > if (lb) { > jk_printf(s, " time_to_recover_min=%d", rs_min); > jk_printf(s, " time_to_recover_max=%d", rs_max); >@@ -2059,6 +2065,7 @@ static void display_worker_ajp_details(j > jk_print_prop_att_int(s, w, ajp_name, "busy", aw->s->busy); > jk_print_prop_att_int(s, w, ajp_name, "max_busy", aw->s->max_busy); > jk_print_prop_att_int(s, w, ajp_name, "connected", aw->s->connected); >+ jk_print_prop_att_int(s, w, ajp_name, "max_connected", aw->s->max_connected); > if (lb) { > jk_print_prop_att_int(s, w, ajp_name, "time_to_recover_min", rs_min); > jk_print_prop_att_int(s, w, ajp_name, "time_to_recover_max", rs_max); >@@ -3726,6 +3733,7 @@ static void display_legend(jk_ws_service > "<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>Con</th><td>Current number of backend connections</td></tr>\n" >+ "<tr><th>MxCon</th><td>Maximum number of backend connections</td></tr>\n" > "<tr><th>RR</th><td>Route redirect</td></tr>\n" > "<tr><th>Cd</th><td>Cluster domain</td></tr>\n" > "<tr><th>Rs</th><td>Recovery scheduled in app. min/max seconds</td></tr>\n"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56869
: 31929