diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-10-26 16:25:37 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-12-21 07:35:04 +0100 |
commit | 9a457d43b31c81d1ab3f8829384d768034e55fd9 (patch) | |
tree | b4c82d93f72b08b1b0ea00060056a1d32d9e5eac | |
parent | ceef936ea894781a14584efc9256856cca6d1c0f (diff) |
stats: Enable stats for sgsn, gbproxy, nitb, bsc, nat
This commit initialises and enables the stats subsystem for the given
binaries.
Sponsored-by: On-Waves ehf
-rw-r--r-- | openbsc/src/gprs/gb_proxy_main.c | 4 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 6 | ||||
-rw-r--r-- | openbsc/src/libbsc/bsc_vty.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_main.c | 2 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat.c | 4 | ||||
-rw-r--r-- | openbsc/src/osmo-nitb/bsc_hack.c | 2 |
6 files changed, 19 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 3da0abed2..874ff39ee 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -36,6 +36,7 @@ #include <osmocom/core/talloc.h> #include <osmocom/core/select.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/stats.h> #include <osmocom/gprs/gprs_ns.h> #include <osmocom/gprs/gprs_bssgp.h> @@ -48,6 +49,7 @@ #include <osmocom/vty/command.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> +#include <osmocom/vty/stats.h> #include <osmocom/vty/ports.h> #include "../../bscconfig.h" @@ -242,11 +244,13 @@ int main(int argc, char **argv) vty_info.copyright = openbsc_copyright; vty_init(&vty_info); logging_vty_add_cmds(&gprs_log_info); + osmo_stats_vty_add_cmds(&gprs_log_info); gbproxy_vty_init(); handle_options(argc, argv); rate_ctr_init(tall_bsc_ctx); + osmo_stats_init(tall_bsc_ctx); rc = telnet_init(tall_bsc_ctx, &dummy_network, OSMO_VTY_PORT_GBPROXY); if (rc < 0) diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index 8cb749939..6c9b3321f 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -37,12 +37,14 @@ #include <osmocom/core/select.h> #include <osmocom/core/rate_ctr.h> #include <osmocom/core/logging.h> +#include <osmocom/core/stats.h> #include <osmocom/gprs/gprs_ns.h> #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> +#include <osmocom/vty/stats.h> #include <osmocom/vty/ports.h> #include <openbsc/signal.h> @@ -302,11 +304,13 @@ int main(int argc, char **argv) osmo_init_ignore_signals(); osmo_init_logging(&gprs_log_info); + osmo_stats_init(tall_bsc_ctx); vty_info.copyright = openbsc_copyright; vty_init(&vty_info); logging_vty_add_cmds(&gprs_log_info); - sgsn_vty_init(); + osmo_stats_vty_add_cmds(&gprs_log_info); + sgsn_vty_init(); handle_options(argc, argv); diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index e3eb7ccb5..c8abbe23e 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -24,6 +24,7 @@ #include <osmocom/vty/buffer.h> #include <osmocom/vty/vty.h> #include <osmocom/vty/logging.h> +#include <osmocom/vty/stats.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/misc.h> @@ -3401,6 +3402,7 @@ int bsc_vty_init(const struct log_info *cat) install_element_ve(&show_paging_group_cmd); logging_vty_add_cmds(cat); + osmo_stats_vty_add_cmds(); install_element(CONFIG_NODE, &cfg_net_cmd); install_node(&net_node, config_write_net); diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c index ee86cb647..443bf5701 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_main.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c @@ -36,6 +36,7 @@ #include <osmocom/core/application.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/stats.h> #include <osmocom/gsm/protocol/gsm_12_21.h> #include <osmocom/abis/abis.h> @@ -192,6 +193,7 @@ int main(int argc, char **argv) tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc"); osmo_init_logging(&log_info); + osmo_stats_init(tall_bsc_ctx); bts_init(); libosmo_abis_init(tall_bsc_ctx); diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c index 1fc262df5..d117cb1b2 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c @@ -55,6 +55,7 @@ #include <osmocom/core/application.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/stats.h> #include <osmocom/gsm/tlv.h> #include <osmocom/gsm/gsm0808.h> @@ -63,6 +64,7 @@ #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/vty.h> #include <osmocom/vty/logging.h> +#include <osmocom/vty/stats.h> #include <osmocom/vty/ports.h> #include <osmocom/sccp/sccp.h> @@ -1623,6 +1625,7 @@ int main(int argc, char **argv) vty_info.copyright = openbsc_copyright; vty_init(&vty_info); logging_vty_add_cmds(&log_info); + osmo_stats_vty_add_cmds(&log_info); bsc_nat_vty_init(nat); @@ -1631,6 +1634,7 @@ int main(int argc, char **argv) handle_options(argc, argv); rate_ctr_init(tall_bsc_ctx); + osmo_stats_init(tall_bsc_ctx); /* init vty and parse */ telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_BSC_NAT); diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c index 351789992..25529793e 100644 --- a/openbsc/src/osmo-nitb/bsc_hack.c +++ b/openbsc/src/osmo-nitb/bsc_hack.c @@ -32,6 +32,7 @@ #include <openbsc/db.h> #include <osmocom/core/application.h> #include <osmocom/core/select.h> +#include <osmocom/core/stats.h> #include <openbsc/debug.h> #include <osmocom/abis/abis.h> #include <osmocom/abis/e1_input.h> @@ -258,6 +259,7 @@ int main(int argc, char **argv) libosmo_abis_init(tall_bsc_ctx); osmo_init_logging(&log_info); + osmo_stats_init(tall_bsc_ctx); bts_init(); /* This needs to precede handle_options() */ |