From a206fa9d5d38d2734c137ed484111f5757b6bde5 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 25 Jan 2009 14:02:00 +0100 Subject: [PATCH] [STATS] report pipe usage in the statistics Pipe usage is reported in info and web stats including maxpipes, pipes_free, and pipes_used. --- src/dumpstats.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/dumpstats.c b/src/dumpstats.c index e14168afad..07e505649d 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -1,7 +1,7 @@ /* * Functions dedicated to statistics output * - * Copyright 2000-2008 Willy Tarreau + * Copyright 2000-2009 Willy Tarreau * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -228,7 +229,10 @@ int stats_dump_raw(struct session *s, struct buffer *rep, struct uri_auth *uri) "Ulimit-n: %d\n" "Maxsock: %d\n" "Maxconn: %d\n" + "Maxpipes: %d\n" "CurrConns: %d\n" + "PipesUsed: %d\n" + "PipesFree: %d\n" "", global.nbproc, relative_pid, @@ -237,9 +241,8 @@ int stats_dump_raw(struct session *s, struct buffer *rep, struct uri_auth *uri) up, global.rlimit_memmax, global.rlimit_nofile, - global.maxsock, - global.maxconn, - actconn + global.maxsock, global.maxconn, global.maxpipes, + actconn, pipes_used, pipes_free ); if (buffer_write_chunk(rep, &msg) >= 0) return 0; @@ -461,8 +464,8 @@ int stats_dump_http(struct session *s, struct buffer *rep, struct uri_auth *uri) "

pid = %d (process #%d, nbproc = %d)
\n" "uptime = %dd %dh%02dm%02ds
\n" "system limits : memmax = %s%s ; ulimit-n = %d
\n" - "maxsock = %d
\n" - "maxconn = %d (current conns = %d)
\n" + "maxsock = %d ; maxconn = %d ; maxpipes = %d
\n" + "current conns = %d ; current pipes = %d/%d
\n" "\n" "\n" "" @@ -490,9 +493,8 @@ int stats_dump_http(struct session *s, struct buffer *rep, struct uri_auth *uri) global.rlimit_memmax ? ultoa(global.rlimit_memmax) : "unlimited", global.rlimit_memmax ? " MB" : "", global.rlimit_nofile, - global.maxsock, - global.maxconn, - actconn + global.maxsock, global.maxconn, global.maxpipes, + actconn, pipes_used, pipes_used+pipes_free ); if (s->data_ctx.stats.flags & STAT_HIDE_DOWN) -- 2.47.2
 active UP