mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-01 02:35:03 +00:00
added rx and tx to subscription nodes
This commit is contained in:
+4
-2
@@ -454,7 +454,8 @@ struct uwsgi_subscribe_node *uwsgi_add_subscribe_node(struct uwsgi_subscribe_slo
|
||||
node->modifier2 = usr->modifier2;
|
||||
node->requests = 0;
|
||||
node->last_requests = 0;
|
||||
node->transferred = 0;
|
||||
node->tx = 0;
|
||||
node->rx = 0;
|
||||
node->reference = 0;
|
||||
node->death_mark = 0;
|
||||
node->failcnt = 0;
|
||||
@@ -541,7 +542,8 @@ struct uwsgi_subscribe_node *uwsgi_add_subscribe_node(struct uwsgi_subscribe_slo
|
||||
current_slot->nodes->reference = 0;
|
||||
current_slot->nodes->requests = 0;
|
||||
current_slot->nodes->last_requests = 0;
|
||||
current_slot->nodes->transferred = 0;
|
||||
current_slot->nodes->tx = 0;
|
||||
current_slot->nodes->rx = 0;
|
||||
current_slot->nodes->death_mark = 0;
|
||||
current_slot->nodes->failcnt = 0;
|
||||
current_slot->nodes->modifier1 = usr->modifier1;
|
||||
|
||||
@@ -1054,7 +1054,8 @@ void corerouter_send_stats(struct uwsgi_corerouter *ucr) {
|
||||
if (uwsgi_stats_keylong_comma(us, "last_check", (unsigned long long) s_node->last_check)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "requests", (unsigned long long) s_node->requests)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "last_requests", (unsigned long long) s_node->last_requests)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "tx", (unsigned long long) s_node->transferred)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "tx", (unsigned long long) s_node->tx)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "rx", (unsigned long long) s_node->rx)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "cores", (unsigned long long) s_node->cores)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "load", (unsigned long long) s_node->load)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "weight", (unsigned long long) s_node->weight)) goto end0;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
uwsgi_cr_error(peer, f);\
|
||||
return -1;\
|
||||
}\
|
||||
if (peer != peer->session->main_peer && peer->un) peer->un->rx+=len;\
|
||||
peer->out_pos += len;
|
||||
|
||||
#define cr_write_buf(peer, ubuf, f) write(peer->fd, ubuf->buf + ubuf##_pos, ubuf->pos - ubuf##_pos);\
|
||||
@@ -29,6 +30,7 @@
|
||||
uwsgi_cr_error(peer, f);\
|
||||
return -1;\
|
||||
}\
|
||||
if (peer != peer->session->main_peer && peer->un) peer->un->rx+=len;\
|
||||
ubuf##_pos += len;
|
||||
|
||||
#define cr_write_complete(peer) peer->out_pos == peer->out->pos
|
||||
@@ -51,6 +53,7 @@
|
||||
uwsgi_cr_error(peer, f);\
|
||||
return -1;\
|
||||
}\
|
||||
if (peer != peer->session->main_peer && peer->un) peer->un->tx+=len;\
|
||||
peer->in->pos += len;\
|
||||
|
||||
#define cr_read_exact(peer, l, f) read(peer->fd, peer->in->buf + peer->in->pos, (l - peer->in->pos));\
|
||||
@@ -59,6 +62,7 @@
|
||||
uwsgi_cr_error(peer, f);\
|
||||
return -1;\
|
||||
}\
|
||||
if (peer != peer->session->main_peer && peer->un) peer->un->tx+=len;\
|
||||
peer->in->pos += len;\
|
||||
|
||||
#define cr_reset_hooks(peer) if(!peer->session->main_peer->disabled) {\
|
||||
|
||||
@@ -480,6 +480,9 @@ void tuntaprouter_send_stats(struct uwsgi_tuntap_router *uttr) {
|
||||
if (uwsgi_stats_object_open(us)) goto end0;
|
||||
if (uwsgi_stats_keyval_comma(us, "addr", uttp->ip)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "addr_32", uttp->addr)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "uid", uttp->uid)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "gid", uttp->gid)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "pid", uttp->pid)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "tx", uttp->tx)) goto end0;
|
||||
if (uwsgi_stats_keylong_comma(us, "rx", uttp->rx)) goto end0;
|
||||
if (uwsgi_stats_keylong(us, "dropped", uttp->dropped)) goto end0;
|
||||
|
||||
Reference in New Issue
Block a user