diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-12 08:29:44 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-13 09:27:13 +0200 |
commit | 19bd74d093b84dfddfd8030d4aaa71ce5e2d25fb (patch) | |
tree | 1734ee6cbc87183062edb6c334ca5c4627557279 /openbsc/src/vty_interface_cmds.c | |
parent | 4821b5a847c2870d8a58074b8ed9ebb769bd2064 (diff) |
[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.
Diffstat (limited to 'openbsc/src/vty_interface_cmds.c')
-rw-r--r-- | openbsc/src/vty_interface_cmds.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); |