From 19bd74d093b84dfddfd8030d4aaa71ce5e2d25fb Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 12 Apr 2010 08:29:44 +0200 Subject: [vty] Separate BSC and MSC statistics. Make it easy to print them. Move the statistics command into the MSC part and move the BSC statistics printing into a subroutine. --- openbsc/src/vty_interface_cmds.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'openbsc/src/vty_interface_cmds.c') diff --git a/openbsc/src/vty_interface_cmds.c b/openbsc/src/vty_interface_cmds.c index d4945840e..623aa30df 100644 --- a/openbsc/src/vty_interface_cmds.c +++ b/openbsc/src/vty_interface_cmds.c @@ -228,6 +228,17 @@ DEFUN(diable_logging, return CMD_SUCCESS; } +void openbsc_vty_print_statistics(struct vty *vty, struct gsm_network *net) +{ + vty_out(vty, "Channel Requests : %lu total, %lu no channel%s", + counter_get(net->stats.chreq.total), + counter_get(net->stats.chreq.no_channel), VTY_NEWLINE); + vty_out(vty, "Paging : %lu attempted, %lu complete, %lu expired%s", + counter_get(net->stats.paging.attempted), + counter_get(net->stats.paging.completed), + counter_get(net->stats.paging.expired), VTY_NEWLINE); +} + void openbsc_vty_add_cmds() { install_element(VIEW_NODE, &enable_logging_cmd); -- cgit v1.2.3