mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
[STATS] report pipe usage in the statistics
Pipe usage is reported in info and web stats including maxpipes, pipes_free, and pipes_used.
This commit is contained in:
parent
3eba98aa57
commit
a206fa9d5d
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Functions dedicated to statistics output
|
* Functions dedicated to statistics output
|
||||||
*
|
*
|
||||||
* Copyright 2000-2008 Willy Tarreau <w@1wt.eu>
|
* Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@ -41,6 +41,7 @@
|
|||||||
#include <proto/buffers.h>
|
#include <proto/buffers.h>
|
||||||
#include <proto/dumpstats.h>
|
#include <proto/dumpstats.h>
|
||||||
#include <proto/fd.h>
|
#include <proto/fd.h>
|
||||||
|
#include <proto/pipe.h>
|
||||||
#include <proto/proto_uxst.h>
|
#include <proto/proto_uxst.h>
|
||||||
#include <proto/session.h>
|
#include <proto/session.h>
|
||||||
#include <proto/server.h>
|
#include <proto/server.h>
|
||||||
@ -228,7 +229,10 @@ int stats_dump_raw(struct session *s, struct buffer *rep, struct uri_auth *uri)
|
|||||||
"Ulimit-n: %d\n"
|
"Ulimit-n: %d\n"
|
||||||
"Maxsock: %d\n"
|
"Maxsock: %d\n"
|
||||||
"Maxconn: %d\n"
|
"Maxconn: %d\n"
|
||||||
|
"Maxpipes: %d\n"
|
||||||
"CurrConns: %d\n"
|
"CurrConns: %d\n"
|
||||||
|
"PipesUsed: %d\n"
|
||||||
|
"PipesFree: %d\n"
|
||||||
"",
|
"",
|
||||||
global.nbproc,
|
global.nbproc,
|
||||||
relative_pid,
|
relative_pid,
|
||||||
@ -237,9 +241,8 @@ int stats_dump_raw(struct session *s, struct buffer *rep, struct uri_auth *uri)
|
|||||||
up,
|
up,
|
||||||
global.rlimit_memmax,
|
global.rlimit_memmax,
|
||||||
global.rlimit_nofile,
|
global.rlimit_nofile,
|
||||||
global.maxsock,
|
global.maxsock, global.maxconn, global.maxpipes,
|
||||||
global.maxconn,
|
actconn, pipes_used, pipes_free
|
||||||
actconn
|
|
||||||
);
|
);
|
||||||
if (buffer_write_chunk(rep, &msg) >= 0)
|
if (buffer_write_chunk(rep, &msg) >= 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -461,8 +464,8 @@ int stats_dump_http(struct session *s, struct buffer *rep, struct uri_auth *uri)
|
|||||||
"<p><b>pid = </b> %d (process #%d, nbproc = %d)<br>\n"
|
"<p><b>pid = </b> %d (process #%d, nbproc = %d)<br>\n"
|
||||||
"<b>uptime = </b> %dd %dh%02dm%02ds<br>\n"
|
"<b>uptime = </b> %dd %dh%02dm%02ds<br>\n"
|
||||||
"<b>system limits :</b> memmax = %s%s ; ulimit-n = %d<br>\n"
|
"<b>system limits :</b> memmax = %s%s ; ulimit-n = %d<br>\n"
|
||||||
"<b>maxsock = </b> %d<br>\n"
|
"<b>maxsock = </b> %d ; <b>maxconn = </b> %d ; <b>maxpipes = </b> %d<br>\n"
|
||||||
"<b>maxconn = </b> %d (current conns = %d)<br>\n"
|
"current conns = %d ; current pipes = %d/%d<br>\n"
|
||||||
"</td><td align=\"center\" nowrap>\n"
|
"</td><td align=\"center\" nowrap>\n"
|
||||||
"<table class=\"lgd\"><tr>\n"
|
"<table class=\"lgd\"><tr>\n"
|
||||||
"<td class=\"active3\"> </td><td class=\"noborder\">active UP </td>"
|
"<td class=\"active3\"> </td><td class=\"noborder\">active UP </td>"
|
||||||
@ -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 ? ultoa(global.rlimit_memmax) : "unlimited",
|
||||||
global.rlimit_memmax ? " MB" : "",
|
global.rlimit_memmax ? " MB" : "",
|
||||||
global.rlimit_nofile,
|
global.rlimit_nofile,
|
||||||
global.maxsock,
|
global.maxsock, global.maxconn, global.maxpipes,
|
||||||
global.maxconn,
|
actconn, pipes_used, pipes_used+pipes_free
|
||||||
actconn
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (s->data_ctx.stats.flags & STAT_HIDE_DOWN)
|
if (s->data_ctx.stats.flags & STAT_HIDE_DOWN)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user