From 493645eda95a27eebf05a594b2ead40801709404 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 12 Apr 2010 08:37:38 +0200 Subject: bsc_msc_ip: Install BSC specific show statistics command. --- openbsc/src/vty_interface_bsc.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'openbsc/src/vty_interface_bsc.c') 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 #include +#include -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; } -- cgit v1.2.3