aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-10 15:32:00 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-11-17 15:42:01 +0100
commit42aba81c2f8c8313fcbf85ee422d6b747107d98a (patch)
treed4fd2492729b48cfe7b5068123738645ae657e64
parent08e5d604d3fce75b955549244b36fde62f20894b (diff)
stats: Enable stats subsystem
Sponsored-by: On-Waves ehf
-rw-r--r--src/pcu_main.cpp2
-rw-r--r--src/pcu_vty.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index ed51212..b32764e 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -32,6 +32,7 @@ extern "C" {
#include "pcu_vty.h"
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/logging.h>
+#include <osmocom/core/stats.h>
}
extern struct gprs_nsvc *nsvc;
@@ -194,6 +195,7 @@ int main(int argc, char *argv[])
msgb_set_talloc_ctx(tall_pcu_ctx);
osmo_init_logging(&gprs_log_info);
+ osmo_stats_init(tall_pcu_ctx);
gprs_ns_set_log_ss(DNS);
bssgp_set_log_ss(DBSSGP);
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 0761301..695a464 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <osmocom/vty/logging.h>
+#include <osmocom/vty/stats.h>
#include <osmocom/vty/misc.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/rate_ctr.h>
@@ -805,6 +806,7 @@ int pcu_vty_init(const struct log_info *cat)
// install_element_ve(&show_pcu_cmd);
logging_vty_add_cmds(cat);
+ osmo_stats_vty_add_cmds(cat);
install_node(&pcu_node, config_write_pcu);
install_element(CONFIG_NODE, &cfg_pcu_cmd);