aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_bsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/vty_interface_bsc.c')
-rw-r--r--openbsc/src/vty_interface_bsc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/openbsc/src/vty_interface_bsc.c b/openbsc/src/vty_interface_bsc.c
index 346ed007f..1a11defb2 100644
--- a/openbsc/src/vty_interface_bsc.c
+++ b/openbsc/src/vty_interface_bsc.c
@@ -27,8 +27,9 @@
#include <vty/vty.h>
#include <openbsc/gsm_data.h>
+#include <openbsc/vty.h>
-static struct gsmnet *gsmnet = NULL;
+static struct gsm_network *gsmnet = NULL;
DEFUN(show_bsc, show_bsc_cmd, "show bsc",
SHOW_STR "Display information about the BSC\n")
@@ -37,12 +38,24 @@ DEFUN(show_bsc, show_bsc_cmd, "show bsc",
return CMD_SUCCESS;
}
+DEFUN(show_stats,
+ show_stats_cmd,
+ "show statistics",
+ SHOW_STR "Display network statistics\n")
+{
+ struct gsm_network *net = gsmnet;
+
+ openbsc_vty_print_statistics(vty, net);
+ return CMD_SUCCESS;
+}
+
int bsc_vty_init_extra(struct gsm_network *net)
{
gsmnet = net;
/* get runtime information */
install_element(VIEW_NODE, &show_bsc_cmd);
+ install_element(VIEW_NODE, &show_stats_cmd);
return 0;
}