]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: report exact last session time in backend too
authorWilly Tarreau <w@1wt.eu>
Sat, 8 Feb 2014 23:50:01 +0000 (00:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 8 Feb 2014 23:51:35 +0000 (00:51 +0100)
I forgot to remove one human_time() in the CSV output for the backend's
lastsess entry in previous patch, which caused the value to be reported
as "1m18s" for example instead of 78.

src/dumpstats.c

index d147d0fbb782ec2cb9450d7080fe8af8099eb9b6..0b7dc082956eb120ef736b2cdd5699a821511577 100644 (file)
@@ -3242,7 +3242,7 @@ static int stats_dump_be_stats(struct stream_interface *si, struct proxy *px, in
                              /* queue : current, max */
                              "%d,%d,"
                              /* sessions : current, max, limit, total, lastsess */
-                             "%d,%d,%d,%lld,%s,"
+                             "%d,%d,%d,%lld,%d,"
                              /* bytes : in, out */
                              "%lld,%lld,"
                              /* denied: req, resp */
@@ -3268,7 +3268,7 @@ static int stats_dump_be_stats(struct stream_interface *si, struct proxy *px, in
                              px->id,
                              px->nbpend /* or px->totpend ? */, px->be_counters.nbpend_max,
                              px->beconn, px->be_counters.conn_max, px->fullconn, px->be_counters.cum_conn,
-                             human_time(be_lastsession(px), 1),
+                             be_lastsession(px),
                              px->be_counters.bytes_in, px->be_counters.bytes_out,
                              px->be_counters.denied_req, px->be_counters.denied_resp,
                              px->be_counters.failed_conns, px->be_counters.failed_resp,