From: Willy Tarreau Date: Tue, 7 Apr 2009 11:27:40 +0000 (+0200) Subject: [BUG] stats: total and lbtot are unsigned X-Git-Tag: v1.3.15.9~8 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=1e8e543c67118c408015698782f4691d9faf96d1;p=haproxy.git [BUG] stats: total and lbtot are unsigned Some big users are seeing negative numbers in the CSV stats. This patch needs to be backported to 1.3.15 and extended to the HTML part. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 894c2487d..b5ecddc14 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -699,7 +699,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) /* pxid, name, queue cur, queue max, */ "%s,FRONTEND,,," /* sessions : current, max, limit, total */ - "%d,%d,%d,%d," + "%d,%d,%d,%u," /* bytes : in, out */ "%lld,%lld," /* denied: req, resp */ @@ -871,7 +871,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) /* queue : current, max */ "%d,%d," /* sessions : current, max, limit, total */ - "%d,%d,%s,%d," + "%d,%d,%s,%u," /* bytes : in, out */ "%lld,%lld," /* denied: req, resp */ @@ -930,7 +930,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) } /* sessions: lbtot */ - chunk_printf(&msg, sizeof(trash), ",%d,", sv->cum_lbconn); + chunk_printf(&msg, sizeof(trash), ",%u,", sv->cum_lbconn); /* tracked */ if (sv->tracked) @@ -1004,7 +1004,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) /* queue : current, max */ "%d,%d," /* sessions : current, max, limit, total */ - "%d,%d,%d,%d," + "%d,%d,%d,%u," /* bytes : in, out */ "%lld,%lld," /* denied: req, resp */ @@ -1022,7 +1022,7 @@ int stats_dump_proxy(struct session *s, struct proxy *px, struct uri_auth *uri) /* rest of backend: nothing, down transitions, last change, total downtime */ ",%d,%d,%d,," /* pid, iid, sid, throttle, lbtot, tracked, type */ - "%d,%d,0,,%d,,%d," + "%d,%d,0,,%u,,%d," "\n", px->id, px->nbpend /* or px->totpend ? */, px->nbpend_max,