From 1104614b57419dbe6f0407d8ce6bf6910d9aeba7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 4 Mar 2010 23:07:28 +0100 Subject: [PATCH] [MINOR] report total number of processed connections when stopping a proxy It's sometimes convenient to know if a proxy has processed any connection at all when stopping it. Since a soft restart causes the "Proxy stopped" message to be logged for each proxy, let's add the number of connections so that it's possible afterwards to check whether a proxy had received any connection. --- src/proxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/proxy.c b/src/proxy.c index 41bf1cf66..57506d9da 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -529,8 +529,10 @@ void maintain_proxies(int *next) int t; t = tick_remain(now_ms, p->stop_time); if (t == 0) { - Warning("Proxy %s stopped.\n", p->id); - send_log(p, LOG_WARNING, "Proxy %s stopped.\n", p->id); + Warning("Proxy %s stopped (FE: %lld conns, BE: %lld conns).\n", + p->id, p->counters.cum_feconn, p->counters.cum_beconn); + send_log(p, LOG_WARNING, "Proxy %s stopped (FE: %lld conns, BE: %lld conns).\n", + p->id, p->counters.cum_feconn, p->counters.cum_beconn); stop_proxy(p); /* try to free more memory */ pool_gc2();