mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-14 17:50:48 +00:00
MINOR: cli: add more information to the "show info" output
In addition to previous outputs, we also emit the cumulated number of connections, the cumulated number of requests, the maximum allowed SSL connection concurrency, the current number of SSL connections and the cumulated number of SSL connections. This will help troubleshoot systems which experience memory shortage due to SSL.
This commit is contained in:
parent
60bb020d70
commit
71b734c307
@ -29,6 +29,9 @@
|
||||
#include <types/stream_interface.h>
|
||||
|
||||
extern struct xprt_ops ssl_sock;
|
||||
extern int sslconns;
|
||||
extern int totalsslconns;
|
||||
|
||||
int ssl_sock_handshake(struct connection *conn, unsigned int flag);
|
||||
int ssl_sock_prepare_ctx(struct bind_conf *bind_conf, SSL_CTX *ctx, struct proxy *proxy);
|
||||
void ssl_sock_free_certs(struct bind_conf *bind_conf);
|
||||
|
@ -2168,8 +2168,15 @@ static int stats_dump_info_to_buffer(struct stream_interface *si)
|
||||
"Maxsock: %d\n"
|
||||
"Maxconn: %d\n"
|
||||
"Hard_maxconn: %d\n"
|
||||
"Maxpipes: %d\n"
|
||||
"CurrConns: %d\n"
|
||||
"CumConns: %d\n"
|
||||
"CumReq: %d\n"
|
||||
#ifdef USE_OPENSSL
|
||||
"MaxSslConns: %d\n"
|
||||
"CurrSslConns: %d\n"
|
||||
"CumSslConns: %d\n"
|
||||
#endif
|
||||
"Maxpipes: %d\n"
|
||||
"PipesUsed: %d\n"
|
||||
"PipesFree: %d\n"
|
||||
"ConnRate: %d\n"
|
||||
@ -2195,8 +2202,12 @@ static int stats_dump_info_to_buffer(struct stream_interface *si)
|
||||
up,
|
||||
global.rlimit_memmax,
|
||||
global.rlimit_nofile,
|
||||
global.maxsock, global.maxconn, global.hardmaxconn, global.maxpipes,
|
||||
actconn, pipes_used, pipes_free,
|
||||
global.maxsock, global.maxconn, global.hardmaxconn,
|
||||
actconn, totalconn, global.req_count,
|
||||
#ifdef USE_OPENSSL
|
||||
global.maxsslconn, sslconns, totalsslconns,
|
||||
#endif
|
||||
global.maxpipes, pipes_used, pipes_free,
|
||||
read_freq_ctr(&global.conn_per_sec), global.cps_lim, global.cps_max,
|
||||
read_freq_ctr(&global.comp_bps_in), read_freq_ctr(&global.comp_bps_out),
|
||||
global.comp_rate_lim,
|
||||
|
@ -86,7 +86,8 @@
|
||||
#define SSL_SOCK_ST_TO_CAEDEPTH(s) ((s >> (6+16)) & 15)
|
||||
#define SSL_SOCK_ST_TO_CRTERROR(s) ((s >> (4+6+16)) & 63)
|
||||
|
||||
static int sslconns = 0;
|
||||
int sslconns = 0;
|
||||
int totalsslconns = 0;
|
||||
|
||||
void ssl_sock_infocbk(const SSL *ssl, int where, int ret)
|
||||
{
|
||||
@ -1129,6 +1130,7 @@ static int ssl_sock_init(struct connection *conn)
|
||||
conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN;
|
||||
|
||||
sslconns++;
|
||||
totalsslconns++;
|
||||
return 0;
|
||||
}
|
||||
else if (objt_listener(conn->target)) {
|
||||
@ -1151,6 +1153,7 @@ static int ssl_sock_init(struct connection *conn)
|
||||
conn->flags |= CO_FL_SSL_WAIT_HS | CO_FL_WAIT_L6_CONN;
|
||||
|
||||
sslconns++;
|
||||
totalsslconns++;
|
||||
return 0;
|
||||
}
|
||||
/* don't know how to handle such a target */
|
||||
|
Loading…
Reference in New Issue
Block a user