unsigned int beconn, beconn_max; /* # of active backend sessions */
struct freq_ctr fe_sess_per_sec; /* sessions per second on the frontend */
struct freq_ctr be_sess_per_sec; /* sessions per second on the backend */
- unsigned int cum_feconn, cum_beconn; /* cumulated number of processed sessions */
- unsigned int cum_lbconn; /* cumulated number of sessions processed by load balancing */
+ long long cum_feconn, cum_beconn; /* cumulated number of processed sessions */
+ long long cum_lbconn; /* cumulated number of sessions processed by load balancing */
unsigned int maxconn; /* max # of active sessions on the frontend */
unsigned int fe_maxsps; /* max # of new sessions per second on the frontend */
unsigned int fullconn; /* #conns on backend above which servers are used at full load */
unsigned down_time; /* total time the proxy was down */
time_t last_change; /* last time, when the state was changed */
- unsigned failed_conns, failed_resp; /* failed connect() and responses */
- unsigned retries, redispatches; /* retried and redispatched connections */
- unsigned denied_req, denied_resp; /* blocked requests/responses because of security concerns */
- unsigned failed_req; /* failed requests (eg: invalid or timeout) */
+ long long failed_conns, failed_resp; /* failed connect() and responses */
+ long long retries, redispatches; /* retried and redispatched connections */
+ long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */
+ long long failed_req; /* failed requests (eg: invalid or timeout) */
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 conn_retries; /* maximum number of connect retries */
struct eb_root *lb_tree; /* we want to know in what tree the server is */
struct server *next_full; /* next server in the temporary full list */
- unsigned failed_checks, down_trans; /* failed checks and up-down transitions */
+ long long failed_checks, down_trans; /* failed checks and up-down transitions */
unsigned down_time; /* total time the server was down */
time_t last_change; /* last time, when the state was changed */
- unsigned failed_conns, failed_resp; /* failed connect() and responses */
- unsigned retries, redispatches; /* retried and redispatched connections */
- unsigned failed_secu; /* blocked responses because of security concerns */
+ long long failed_conns, failed_resp; /* failed connect() and responses */
+ long long retries, redispatches; /* retried and redispatched connections */
+ long long failed_secu; /* blocked responses because of security concerns */
struct freq_ctr sess_per_sec; /* sessions per second on this server */
- unsigned cum_sess; /* cumulated number of sessions really sent to this server */
- unsigned cum_lbconn; /* cumulated number of sessions directed by load balancing */
+ long long cum_sess; /* cumulated number of sessions really sent to this server */
+ long long cum_lbconn; /* cumulated number of sessions directed by load balancing */
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 */
/* pxid, name, queue cur, queue max, */
"%s,FRONTEND,,,"
/* sessions : current, max, limit, total */
- "%d,%d,%d,%u,"
+ "%d,%d,%d,%lld,"
/* bytes : in, out */
"%lld,%lld,"
/* denied: req, resp */
- "%d,%d,"
+ "%lld,%lld,"
/* errors : request, connect, response */
- "%d,,,"
+ "%lld,,,"
/* warnings: retries, redispatches */
",,"
/* server status : reflect frontend status */
/* errors : request, connect, response */
"<td align=right></td><td align=right>%s</td><td align=right>%s</td>\n"
/* warnings: retries, redispatches */
- "<td align=right>%u</td><td align=right>%u</td>"
+ "<td align=right>%lld</td><td align=right>%lld</td>"
"",
U2H0(sv->bytes_in), U2H1(sv->bytes_out),
U2H2(sv->failed_secu),
/* check failures: unique, fatal, down time */
if (sv->state & SRV_CHECKED)
chunk_printf(&msg, sizeof(trash),
- "<td align=right>%d</td><td align=right>%d</td>"
+ "<td align=right>%lld</td><td align=right>%lld</td>"
"<td nowrap align=right>%s</td>"
"",
svs->failed_checks, svs->down_trans,
/* queue : current, max */
"%d,%d,"
/* sessions : current, max, limit, total */
- "%d,%d,%s,%u,"
+ "%d,%d,%s,%lld,"
/* bytes : in, out */
"%lld,%lld,"
/* denied: req, resp */
- ",%d,"
+ ",%lld,"
/* errors : request, connect, response */
- ",%d,%d,"
+ ",%lld,%lld,"
/* warnings: retries, redispatches */
- "%u,%u,"
+ "%lld,%lld,"
"",
px->id, sv->id,
sv->nbpend, sv->nbpend_max,
/* check failures: unique, fatal; last change, total downtime */
if (sv->state & SRV_CHECKED)
chunk_printf(&msg, sizeof(trash),
- "%d,%d,%d,%d,",
+ "%lld,%lld,%d,%d,",
sv->failed_checks, sv->down_trans,
(int)(now.tv_sec - sv->last_change), srv_downtime(sv));
else
}
/* sessions: lbtot */
- chunk_printf(&msg, sizeof(trash), ",%u,", sv->cum_lbconn);
+ chunk_printf(&msg, sizeof(trash), ",%lld,", sv->cum_lbconn);
/* tracked */
if (sv->tracked)
/* errors : request, connect, response */
"<td align=right></td><td align=right>%s</td><td align=right>%s</td>\n"
/* warnings: retries, redispatches */
- "<td align=right>%u</td><td align=right>%u</td>"
+ "<td align=right>%lld</td><td align=right>%lld</td>"
/* backend status: reflect backend status (up/down): we display UP
* if the backend has known working servers or if it has no server at
* all (eg: for stats). Then we display the total weight, number of
/* queue : current, max */
"%d,%d,"
/* sessions : current, max, limit, total */
- "%d,%d,%d,%u,"
+ "%d,%d,%d,%lld,"
/* bytes : in, out */
"%lld,%lld,"
/* denied: req, resp */
- "%d,%d,"
+ "%lld,%lld,"
/* errors : request, connect, response */
- ",%d,%d,"
+ ",%lld,%lld,"
/* warnings: retries, redispatches */
- "%u,%u,"
+ "%lld,%lld,"
/* backend status: reflect backend status (up/down): we display UP
* if the backend has known working servers or if it has no server at
* all (eg: for stats). Then we display the total weight, number of
/* rest of backend: nothing, down transitions, last change, total downtime */
",%d,%d,%d,,"
/* pid, iid, sid, throttle, lbtot, tracked, type */
- "%d,%d,0,,%u,,%d,"
+ "%d,%d,0,,%lld,,%d,"
/* rate */
"%u,"
"\n",
send_log(p, LOG_NOTICE, "SIGHUP received, dumping servers states for proxy %s.\n", p->id);
while (s) {
snprintf(trash, sizeof(trash),
- "SIGHUP: Server %s/%s is %s. Conn: %d act, %d pend, %d tot.",
+ "SIGHUP: Server %s/%s is %s. Conn: %d act, %d pend, %lld tot.",
p->id, s->id,
(s->state & SRV_RUNNING) ? "UP" : "DOWN",
s->cur_sess, s->nbpend, s->cum_sess);
/* FIXME: those info are a bit outdated. We should be able to distinguish between FE and BE. */
if (!p->srv) {
snprintf(trash, sizeof(trash),
- "SIGHUP: Proxy %s has no servers. Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %d+%d.",
+ "SIGHUP: Proxy %s has no servers. Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %lld+%lld.",
p->id,
p->feconn, p->beconn, p->totpend, p->nbpend, p->cum_feconn, p->cum_beconn);
} else if (p->srv_act == 0) {
snprintf(trash, sizeof(trash),
- "SIGHUP: Proxy %s %s ! Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %d+%d.",
+ "SIGHUP: Proxy %s %s ! Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %lld+%lld.",
p->id,
(p->srv_bck) ? "is running on backup servers" : "has no server available",
p->feconn, p->beconn, p->totpend, p->nbpend, p->cum_feconn, p->cum_beconn);
} else {
snprintf(trash, sizeof(trash),
"SIGHUP: Proxy %s has %d active servers and %d backup servers available."
- " Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %d+%d.",
+ " Conn: act(FE+BE): %d+%d, %d pend (%d unass), tot(FE+BE): %lld+%lld.",
p->id, p->srv_act, p->srv_bck,
p->feconn, p->beconn, p->totpend, p->nbpend, p->cum_feconn, p->cum_beconn);
}