diff options
Diffstat (limited to 'src/osmo-bsc/bsc_init.c')
-rw-r--r-- | src/osmo-bsc/bsc_init.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c index 18776f33d..d08e9c861 100644 --- a/src/osmo-bsc/bsc_init.c +++ b/src/osmo-bsc/bsc_init.c @@ -44,6 +44,18 @@ #include <limits.h> #include <stdbool.h> +static const struct osmo_stat_item_desc bsc_stat_desc[] = { + { "num_bts:total", "Number of configured BTS for this BSC", "", 16, 0 }, +}; + +static const struct osmo_stat_item_group_desc bsc_statg_desc = { + .group_name_prefix = "bsc", + .group_description = "base station controller", + .class_id = OSMO_STATS_CLASS_GLOBAL, + .num_items = ARRAY_SIZE(bsc_stat_desc), + .item_desc = bsc_stat_desc, +}; + int bsc_shutdown_net(struct gsm_network *net) { struct gsm_bts *bts; @@ -268,6 +280,12 @@ static struct gsm_network *bsc_network_init(void *ctx) talloc_free(net); return NULL; } + net->bsc_statg = osmo_stat_item_group_alloc(net, &bsc_statg_desc, 0); + if (!net->bsc_statg) { + rate_ctr_group_free(net->bsc_ctrs); + talloc_free(net); + return NULL; + } INIT_LLIST_HEAD(&net->bts_rejected); gsm_net_update_ctype(net); |