Implemented basic statistics API.

This commit is contained in:
Valentin Bartenev
2022-08-29 14:27:09 +08:00
parent f2bab1b1be
commit ce26dd729e
14 changed files with 459 additions and 16 deletions

32
src/nxt_status.h Normal file
View File

@@ -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_ */