[MINOR] updated the sig_dump_state() output to show the conn queue state.
This commit is contained in:
parent
f32f52404b
commit
4632c21c11
36
haproxy.c
36
haproxy.c
|
@ -6735,36 +6735,30 @@ void sig_dump_state(int sig) {
|
||||||
while (p) {
|
while (p) {
|
||||||
struct server *s = p->srv;
|
struct server *s = p->srv;
|
||||||
|
|
||||||
send_log(p, LOG_NOTICE, "SIGUP received, dumping servers states for proxy %s.\n", p->id);
|
send_log(p, LOG_NOTICE, "SIGHUP received, dumping servers states for proxy %s.\n", p->id);
|
||||||
while (s) {
|
while (s) {
|
||||||
if (s->state & SRV_RUNNING) {
|
snprintf(trash, sizeof(trash),
|
||||||
snprintf(trash, sizeof(trash),
|
"SIGHUP: Server %s/%s is %s. Conn: %d act, %d pend, %d tot.",
|
||||||
"SIGHUP: Server %s/%s is UP. Conn: %d act, %d tot.",
|
p->id, s->id,
|
||||||
p->id, s->id, s->cur_sess, s->cum_sess);
|
(s->state & SRV_RUNNING) ? "UP" : "DOWN",
|
||||||
} else {
|
s->cur_sess, s->nbpend, s->cum_sess);
|
||||||
snprintf(trash, sizeof(trash),
|
|
||||||
"SIGHUP: Server %s/%s is DOWN. Conn: %d act, %d tot.",
|
|
||||||
p->id, s->id, s->cur_sess, s->cum_sess);
|
|
||||||
}
|
|
||||||
Warning("%s\n", trash);
|
Warning("%s\n", trash);
|
||||||
send_log(p, LOG_NOTICE, "%s\n", trash);
|
send_log(p, LOG_NOTICE, "%s\n", trash);
|
||||||
s = s->next;
|
s = s->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->srv_act == 0) {
|
if (p->srv_act == 0) {
|
||||||
if (p->srv_bck) {
|
snprintf(trash, sizeof(trash),
|
||||||
snprintf(trash, sizeof(trash),
|
"SIGHUP: Proxy %s %s ! Conn: %d act, %d pend (%d unass), %d tot.",
|
||||||
"SIGHUP: Proxy %s is running on backup servers ! Conn: %d act, %d tot.",
|
p->id,
|
||||||
p->id, p->nbconn, p->cum_conn);
|
(p->srv_bck) ? "is running on backup servers" : "has no server available",
|
||||||
} else {
|
p->nbconn, p->totpend, p->nbpend, p->cum_conn);
|
||||||
snprintf(trash, sizeof(trash),
|
|
||||||
"SIGHUP: Proxy %s has no server availble ! Conn: %d act, %d tot.",
|
|
||||||
p->id, p->nbconn, p->cum_conn);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
snprintf(trash, sizeof(trash),
|
snprintf(trash, sizeof(trash),
|
||||||
"SIGHUP: Proxy %s has %d active servers and %d backup servers availble. Conn: %d act, %d tot.",
|
"SIGHUP: Proxy %s has %d active servers and %d backup servers available."
|
||||||
p->id, p->srv_act, p->srv_bck, p->nbconn, p->cum_conn);
|
" Conn: %d act, %d pend (%d unass), %d tot.",
|
||||||
|
p->id, p->srv_act, p->srv_bck,
|
||||||
|
p->nbconn, p->totpend, p->nbpend, p->cum_conn);
|
||||||
}
|
}
|
||||||
Warning("%s\n", trash);
|
Warning("%s\n", trash);
|
||||||
send_log(p, LOG_NOTICE, "%s\n", trash);
|
send_log(p, LOG_NOTICE, "%s\n", trash);
|
||||||
|
|
Loading…
Reference in New Issue