From a17c2d93617012f6e7db98fcdfadd434a96ed847 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 25 Jul 2011 08:16:20 +0200 Subject: [PATCH] [MINOR] stats: report a "WAITING" state for sockets waiting for resource This is useful when enabling socket-stats to know that a socket is being waiting for some resource (RAM, global connections, etc...). --- doc/configuration.txt | 5 +++-- src/dumpstats.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 4811043b8..2eafd7fb5 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4161,8 +4161,9 @@ rate-limit sessions rate-limit sessions 10 server 127.0.0.1:1025 - Note : when the maximum rate is reached, the frontend's status appears as - "FULL" in the statistics, exactly as when it is saturated. + Note : when the maximum rate is reached, the frontend's status is not changed + but its sockets appear as "WAITING" in the statistics if the + "socket-stats" option is enabled. See also : the "backlog" keyword and the "fe_sess_rate" ACL criterion. diff --git a/src/dumpstats.c b/src/dumpstats.c index 3ef2278c1..96999852c 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -2213,7 +2213,7 @@ static int stats_dump_proxy(struct stream_interface *si, struct proxy *px, struc "", U2H0(l->counters->denied_req), U2H1(l->counters->denied_resp), U2H2(l->counters->failed_req), - (l->nbconn < l->maxconn) ? "OPEN" : "FULL"); + (l->nbconn < l->maxconn) ? (l->state == LI_LIMITED) ? "WAITING" : "OPEN" : "FULL"); } else { chunk_printf(&msg, /* pxid, name, queue cur, queue max, */