]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] stats: report a "WAITING" state for sockets waiting for resource
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Jul 2011 06:16:20 +0000 (08:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Jul 2011 06:18:47 +0000 (08:18 +0200)
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
src/dumpstats.c

index 4811043b8ed3b61a641b23f7b6e31d039baacd8d..2eafd7fb535ba2423839ba7003695461db2099c2 100644 (file)
@@ -4161,8 +4161,9 @@ rate-limit sessions <rate>
             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.
 
index 3ef2278c1ac5cb3b1d4536504f86572fc827b4ea..96999852c8b867cbfb09cd238ee35c5ffea12705 100644 (file)
@@ -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, */