[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 a4e80c2..b132f71 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -728,7 +728,7 @@
/* 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 */
@@ -907,7 +907,7 @@
/* 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 */
@@ -966,7 +966,7 @@
}
/* sessions: lbtot */
- chunk_printf(&msg, sizeof(trash), ",%d,", sv->cum_lbconn);
+ chunk_printf(&msg, sizeof(trash), ",%u,", sv->cum_lbconn);
/* tracked */
if (sv->tracked)
@@ -1052,7 +1052,7 @@
/* 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 */
@@ -1070,7 +1070,7 @@
/* 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,"
/* rate */
"%u,"
"\n",