proxy->timeout.check = TICK_ETERNITY;
}
-/* increase the number of cumulated connections on the designated frontend */
-static void inline proxy_inc_fe_ctr(struct listener *l, struct proxy *fe)
+/* increase the number of cumulated connections received on the designated frontend */
+static void inline proxy_inc_fe_conn_ctr(struct listener *l, struct proxy *fe)
{
fe->counters.cum_feconn++;
if (l->counters)
l->counters->cum_conn++;
+ update_freq_ctr(&fe->fe_conn_per_sec, 1);
+ if (fe->fe_conn_per_sec.curr_ctr > fe->counters.fe_cps_max)
+ fe->counters.fe_cps_max = fe->fe_conn_per_sec.curr_ctr;
+}
+
+/* increase the number of cumulated connections accepted by the designated frontend */
+static void inline proxy_inc_fe_sess_ctr(struct listener *l, struct proxy *fe)
+{
+ fe->counters.cum_fesess++;
+ if (l->counters)
+ l->counters->cum_sess++;
update_freq_ctr(&fe->fe_sess_per_sec, 1);
if (fe->fe_sess_per_sec.curr_ctr > fe->counters.fe_sps_max)
fe->counters.fe_sps_max = fe->fe_sess_per_sec.curr_ctr;
unsigned int feconn_max, beconn_max; /* max # of active frontend and backend sessions */
long long cum_fe_req; /* cumulated number of processed HTTP requests */
- long long cum_feconn, cum_beconn; /* cumulated number of processed sessions */
- long long cum_lbconn; /* cumulated number of sessions processed by load balancing */
+ long long cum_feconn, cum_fesess; /* cumulated number of received/accepted connections */
+ long long cum_beconn, cum_lbconn; /* cumulated number of sessions processed by load balancing */
unsigned int fe_rps_max; /* maximum of new sessions per second seen on the frontend */
- unsigned int fe_sps_max; /* maximum of new sessions per second seen on the frontend */
+ unsigned int fe_cps_max; /* maximum of new connections per second received on the frontend */
+ unsigned int fe_sps_max; /* maximum of new sessions per second accepted on the frontend */
unsigned int be_sps_max; /* maximum of new sessions per second seen on the backend */
unsigned int nbpend_max; /* max number of pending connections with no server assigned yet */
struct licounters {
unsigned int conn_max; /* max # of active listener sessions */
- long long cum_conn; /* cumulated number of processed sessions */
+ long long cum_conn; /* cumulated number of received connections */
+ long long cum_sess; /* cumulated number of accepted sessions */
long long bytes_in; /* number of bytes transferred from the client to the server */
long long bytes_out; /* number of bytes transferred from the server to the client */
int totpend; /* total number of pending connections on this instance (for stats) */
unsigned int feconn, beconn; /* # of active frontend and backends sessions */
struct freq_ctr fe_req_per_sec; /* HTTP requests per second on the frontend */
- struct freq_ctr fe_sess_per_sec; /* sessions per second on the frontend */
+ struct freq_ctr fe_conn_per_sec; /* received connections per second on the frontend */
+ struct freq_ctr fe_sess_per_sec; /* accepted sessions per second on the frontend (after tcp rules) */
struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */
unsigned int maxconn; /* max # of active sessions on the frontend */
unsigned int fe_sps_lim; /* limit on new sessions per second on the frontend */
px->counters.beconn_max = 0;
px->counters.fe_rps_max = 0;
px->counters.fe_sps_max = 0;
+ px->counters.fe_cps_max = 0;
px->counters.be_sps_max = 0;
px->counters.nbpend_max = 0;
}
"<td>%s</td><td>%s</td>"
"",
(px->mode == PR_MODE_HTTP)?"<u>":"",
- U2H6(px->counters.cum_feconn),
+ U2H6(px->counters.cum_fesess),
(px->mode == PR_MODE_HTTP)?"</u>":"",
U2H7(px->counters.bytes_in), U2H8(px->counters.bytes_out));
/* check_status, check_code, check_duration */
",,,",
px->id,
- px->feconn, px->counters.feconn_max, px->maxconn, px->counters.cum_feconn,
+ px->feconn, px->counters.feconn_max, px->maxconn, px->counters.cum_fesess,
px->counters.bytes_in, px->counters.bytes_out,
px->counters.denied_req, px->counters.denied_resp,
px->counters.failed_req,
s->logs.accept_date = date; /* user-visible date for logging */
s->logs.tv_accept = now; /* corrected date for internal use */
s->uniq_id = totalconn;
- proxy_inc_fe_ctr(l, p); /* note: cum_beconn will be increased once assigned */
+ proxy_inc_fe_conn_ctr(l, p); /* note: cum_beconn will be increased once assigned */
t->process = l->handler;
t->context = s;
return 0;
}
+ /* This session was accepted, count it now */
+ proxy_inc_fe_sess_ctr(l, p);
+
/* this part should be common with other protocols */
s->si[0].fd = cfd;
s->si[0].owner = t;