aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-10-20 11:06:31 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-05-02 20:13:41 +0200
commit9670776c63db2e176d5cbf7ef0e2bb49a50d16e3 (patch)
tree54ae104e44c7488c5b0d132bd74466ec83d41345 /openbsc
parent44c841e196dcccfe9c195c8b463c296e19a0ef68 (diff)
bsc vty: Provide a show mscs command to show the state of each MSC
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c18
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;
}