From 338be83aea3b682fadda708d7c94b77ca5a8c5ea Mon Sep 17 00:00:00 2001 From: willy tarreau Date: Sun, 21 May 2006 08:58:06 +0200 Subject: [PATCH] [MINOR] cosmetic changes in the stats interface --- haproxy.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/haproxy.c b/haproxy.c index cc2be57c7..a95f475ac 100644 --- a/haproxy.c +++ b/haproxy.c @@ -3131,11 +3131,11 @@ int produce_content(struct session *s) { "

" PRODUCT_NAME "

\n" "

Statistics Report for pid %d

\n" "
\n" - "

> General process informations

\n" + "

> General process information

\n" "\n", - sv->failed_checks, sv->down_trans); + if (sv->state & SRV_CHECKED) + msglen += snprintf(trash + msglen, sizeof(trash) - msglen, + "\n", + sv->failed_checks, sv->down_trans); + else + msglen += snprintf(trash + msglen, sizeof(trash) - msglen, + "\n"); sv = sv->next; if (!sv) {
\n" "

pid = %d (nbproc = %d)
\n" "uptime = %dd %dh%02dm%02ds
\n" - "system limits : memmax = %d Megs ; ulimit-n = %d
\n" + "system limits : memmax = %s%s ; ulimit-n = %d
\n" "maxsock = %d
\n" "maxconn = %d (current conns = %d)
\n" "

\n" @@ -3155,7 +3155,8 @@ int produce_content(struct session *s) { pid, pid, global.nbproc, up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60), - global.rlimit_memmax, + global.rlimit_memmax ? ultoa(global.rlimit_memmax) : "unlimited", + global.rlimit_memmax ? " MB" : "", global.rlimit_nofile, global.maxsock, global.maxconn, @@ -3261,9 +3262,13 @@ int produce_content(struct session *s) { sv->cur_sess, sv->cur_sess_max, sv->maxconn ? ultoa(sv->maxconn) : "-", sv->cum_sess); /* failures : unique, fatal */ - msglen += snprintf(trash + msglen, sizeof(trash) - msglen, - "%d%d
%d%d
--