diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-10-20 11:06:31 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2011-11-04 12:28:04 +0100 |
commit | b8a512a320f6688c66377d29ce3e6f24e15782a0 (patch) | |
tree | d6f5ca6a8de9ada7a7e1da3c8dc0e4e221da06f8 /openbsc/src | |
parent | 4c55b09c588e0ffa34aff60eb69f4a175c4d84dd (diff) |
bsc vty: Provide a show mscs command to show the state of each MSC
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_vty.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c index f4c462efb..0a6776206 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -495,6 +495,23 @@ DEFUN(show_statistics, return CMD_SUCCESS; } +DEFUN(show_mscs, + show_mscs_cmd, + "show mscs", + SHOW_STR "MSC Connections and State\n") +{ + struct osmo_msc_data *msc; + llist_for_each_entry(msc, &bsc_gsmnet->bsc_data->mscs, entry) { + vty_out(vty, "MSC Nr: %d is connected: %d auth: %d.%s", + msc->nr, + msc->msc_con ? msc->msc_con->is_connected : -1, + msc->msc_con ? msc->msc_con->is_authenticated : -1, + VTY_NEWLINE); + } + + return CMD_SUCCESS; +} + int bsc_vty_init_extra(void) { install_element(CONFIG_NODE, &cfg_net_msc_cmd); @@ -533,6 +550,7 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd); install_element_ve(&show_statistics_cmd); + install_element_ve(&show_mscs_cmd); return 0; } |