summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_status.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2022-08-29 14:27:09 +0800
committerValentin Bartenev <vbart@nginx.com>2022-08-29 14:27:09 +0800
commitce26dd729e6842c9ec8cc83bf091167e4c50a1ec (patch)
treed215198f765faeefd46253bd118e8d058d31fd1e /src/nxt_status.h
parentf2bab1b1be658e3456aa1cec84a1879d4b01577e (diff)
downloadunit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.gz
unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.bz2
Implemented basic statistics API.
Diffstat (limited to 'src/nxt_status.h')
-rw-r--r--src/nxt_status.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/nxt_status.h b/src/nxt_status.h
new file mode 100644
index 00000000..b12eabcb
--- /dev/null
+++ b/src/nxt_status.h
@@ -0,0 +1,32 @@
+
+/*
+ * Copyright (C) NGINX, Inc.
+ */
+
+#ifndef _NXT_STATUS_H_INCLUDED_
+#define _NXT_STATUS_H_INCLUDED_
+
+
+typedef struct {
+ nxt_str_t name;
+ uint32_t active_requests;
+ uint32_t pending_processes;
+ uint32_t processes;
+ uint32_t idle_processes;
+} nxt_status_app_t;
+
+
+typedef struct {
+ uint64_t accepted_conns;
+ uint64_t idle_conns;
+ uint64_t closed_conns;
+
+ size_t apps_count;
+ nxt_status_app_t apps[];
+} nxt_status_report_t;
+
+
+nxt_conf_value_t *nxt_status_get(nxt_status_report_t *report, nxt_mp_t *mp);
+
+
+#endif /* _NXT_STATUS_H_INCLUDED_ */