diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-12 08:37:38 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-13 09:47:21 +0200 |
commit | 493645eda95a27eebf05a594b2ead40801709404 (patch) | |
tree | ef9bde15794a6f33d93d3adc5b4c041df0caf135 | |
parent | 8614cd0be7793a7cda82d3f9d0a397e74f1a7a89 (diff) |
bsc_msc_ip: Install BSC specific show statistics command.
-rw-r--r-- | openbsc/src/vty_interface_bsc.c | 15 |
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; } |