diff options
author | Zhidao HONG <z.hong@f5.com> | 2022-08-29 14:32:20 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2022-08-29 14:32:20 +0800 |
commit | 3ea113fcb7261a0be3b9dc8d32c402da1bcfadaa (patch) | |
tree | e262c8881ede343ba966b04d2eb43d8af596519a /src/nxt_status.c | |
parent | ce26dd729e6842c9ec8cc83bf091167e4c50a1ec (diff) | |
download | unit-3ea113fcb7261a0be3b9dc8d32c402da1bcfadaa.tar.gz unit-3ea113fcb7261a0be3b9dc8d32c402da1bcfadaa.tar.bz2 |
Status: added requests count.
Diffstat (limited to 'src/nxt_status.c')
-rw-r--r-- | src/nxt_status.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_status.c b/src/nxt_status.c index 529f6ebb..12280019 100644 --- a/src/nxt_status.c +++ b/src/nxt_status.c @@ -23,6 +23,7 @@ nxt_status_get(nxt_status_report_t *report, nxt_mp_t *mp) static nxt_str_t idle_str = nxt_string("idle"); static nxt_str_t closed_str = nxt_string("closed"); static nxt_str_t reqs_str = nxt_string("requests"); + static nxt_str_t total_str = nxt_string("total"); static nxt_str_t apps_str = nxt_string("applications"); static nxt_str_t procs_str = nxt_string("processes"); static nxt_str_t run_str = nxt_string("running"); @@ -47,13 +48,15 @@ nxt_status_get(nxt_status_report_t *report, nxt_mp_t *mp) nxt_conf_set_member_integer(obj, &idle_str, report->idle_conns, 2); nxt_conf_set_member_integer(obj, &closed_str, report->closed_conns, 3); - obj = nxt_conf_create_object(mp, 0); + obj = nxt_conf_create_object(mp, 1); if (nxt_slow_path(obj == NULL)) { return NULL; } nxt_conf_set_member(status, &reqs_str, obj, 1); + nxt_conf_set_member_integer(obj, &total_str, report->requests, 0); + apps = nxt_conf_create_object(mp, report->apps_count); if (nxt_slow_path(obj == NULL)) { return NULL; |