diff --git a/src/base.h b/src/base.h index 42f8de98..9d079b45 100644 --- a/src/base.h +++ b/src/base.h @@ -559,6 +559,21 @@ typedef struct server { connections *fdwaitqueue; stat_cache *stat_cache; + + /** + * The status array can carry all the status information you want + * the key to the array is . + * and the values are counters + * + * example: + * fastcgi.backends = 10 + * fastcgi.active-backends = 6 + * fastcgi.backend..load = 24 + * fastcgi.backend..... + * + * fastcgi.backend..disconnects = ... + */ + array *status; fdevent_handler_t event_handler; diff --git a/src/server.c b/src/server.c index 33648be8..9326f844 100644 --- a/src/server.c +++ b/src/server.c @@ -148,6 +148,7 @@ static server *server_init(void) { CLEAN(config_context); CLEAN(config_touched); + CLEAN(status); #undef CLEAN for (i = 0; i < FILE_CACHE_MAX; i++) { @@ -245,6 +246,7 @@ static void server_free(server *srv) { CLEAN(config_context); CLEAN(config_touched); + CLEAN(status); #undef CLEAN joblist_free(srv, srv->joblist);