diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-10-20 11:06:31 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-05-11 12:41:13 +0200 |
commit | c50e04a409cb9414d2a2722703e3f121da8d96ea (patch) | |
tree | b40965cd46e326b62c855f0989178de0efe4ee5d | |
parent | 5e80cc4adcfdebca1f0ab09e4ac864c4b9f34748 (diff) |
bsc vty: Provide a show mscs command to show the state of each MSC
-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 8cf5a1438..276a490ba 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c @@ -356,6 +356,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); @@ -377,6 +394,7 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_rf_socket_cmd); install_element_ve(&show_statistics_cmd); + install_element_ve(&show_mscs_cmd); return 0; } |