From: Willy Tarreau Date: Wed, 7 Sep 2011 13:26:48 +0000 (+0200) Subject: [MINOR] stats: report the current and max global connection rates X-Git-Tag: v1.5-dev8~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cd552d8f4b055c1f1e15244a2fc150d443bdd01;p=thirdparty%2Fhaproxy.git [MINOR] stats: report the current and max global connection rates The HTML page reports the current process connection rate, and the "show info" command on the stats socket also reports the conn rate limit and the max conn rate that was once reached. Note that the max value can be cleared using "clear counters". --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 4fde2919a9..73d5ad649e 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -1433,6 +1433,9 @@ static int stats_dump_raw_to_buffer(struct stream_interface *si) "CurrConns: %d\n" "PipesUsed: %d\n" "PipesFree: %d\n" + "ConnRate: %d\n" + "ConnRateLimit: %d\n" + "MaxConnRate: %d\n" "Tasks: %d\n" "Run_queue: %d\n" "node: %s\n" @@ -1447,6 +1450,7 @@ static int stats_dump_raw_to_buffer(struct stream_interface *si) global.rlimit_nofile, global.maxsock, global.maxconn, global.hardmaxconn, global.maxpipes, actconn, pipes_used, pipes_free, + read_freq_ctr(&global.conn_per_sec), global.cps_lim, global.cps_max, nb_tasks_cur, run_queue_cur, global.node, global.desc?global.desc:"" ); @@ -1762,7 +1766,7 @@ static int stats_dump_http(struct stream_interface *si, struct uri_auth *uri) "uptime = %dd %dh%02dm%02ds
\n" "system limits: memmax = %s%s; ulimit-n = %d
\n" "maxsock = %d; maxconn = %d; maxpipes = %d
\n" - "current conns = %d; current pipes = %d/%d
\n" + "current conns = %d; current pipes = %d/%d; conn rate = %d/sec
\n" "Running tasks: %d/%d
\n" "\n" "\n" @@ -1795,7 +1799,7 @@ static int stats_dump_http(struct stream_interface *si, struct uri_auth *uri) global.rlimit_memmax ? " MB" : "", global.rlimit_nofile, global.maxsock, global.maxconn, global.maxpipes, - actconn, pipes_used, pipes_used+pipes_free, + actconn, pipes_used, pipes_used+pipes_free, read_freq_ctr(&global.conn_per_sec), run_queue_cur, nb_tasks_cur );