aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-10-26 16:25:37 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 16:01:27 +0100
commit64630cccc763da7088c1d1ff251a89d4d352cd4b (patch)
tree6e4ea25f13e3ebd0d7a0fd9bb8a446e41aeb8c3c
parent11cb27ece64944c17c2714cfe7ea9971a8c4ab7c (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.c4
-rw-r--r--openbsc/src/gprs/sgsn_main.c6
-rw-r--r--openbsc/src/libbsc/bsc_vty.c2
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c2
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c4
-rw-r--r--openbsc/src/osmo-nitb/bsc_hack.c2
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 45b45a454..f82fb5b73 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 e6a361d2a..2d3a0e4a9 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 f8ef833d2..24bae9799 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>
@@ -3737,6 +3738,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 3ab126774..4bb2da170 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 18343dd5a..816ae58b6 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -56,6 +56,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>
@@ -64,6 +65,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>
@@ -1613,6 +1615,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);
@@ -1621,6 +1624,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 7229a9b2f..8b074f117 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() */