mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 16:14:03 +00:00
nat: Allow to only show statistics for a given BSC Cfg.
This commit is contained in:
@@ -142,11 +142,16 @@ DEFUN(show_bsc_cfg, show_bsc_cfg_cmd, "show bsc config",
|
|||||||
|
|
||||||
DEFUN(show_stats,
|
DEFUN(show_stats,
|
||||||
show_stats_cmd,
|
show_stats_cmd,
|
||||||
"show statistics",
|
"show statistics [NR]",
|
||||||
SHOW_STR "Display network statistics")
|
SHOW_STR "Display network statistics")
|
||||||
{
|
{
|
||||||
struct bsc_config *conf;
|
struct bsc_config *conf;
|
||||||
|
|
||||||
|
int nr = -1;
|
||||||
|
|
||||||
|
if (argc == 1)
|
||||||
|
nr = atoi(argv[0]);
|
||||||
|
|
||||||
vty_out(vty, "NAT statistics%s", VTY_NEWLINE);
|
vty_out(vty, "NAT statistics%s", VTY_NEWLINE);
|
||||||
vty_out(vty, " SCCP Connections %lu total, %lu calls%s",
|
vty_out(vty, " SCCP Connections %lu total, %lu calls%s",
|
||||||
counter_get(_nat->stats.sccp.conn),
|
counter_get(_nat->stats.sccp.conn),
|
||||||
@@ -158,6 +163,9 @@ DEFUN(show_stats,
|
|||||||
counter_get(_nat->stats.bsc.auth_fail), VTY_NEWLINE);
|
counter_get(_nat->stats.bsc.auth_fail), VTY_NEWLINE);
|
||||||
|
|
||||||
llist_for_each_entry(conf, &_nat->bsc_configs, entry) {
|
llist_for_each_entry(conf, &_nat->bsc_configs, entry) {
|
||||||
|
if (argc == 1 && nr != conf->nr)
|
||||||
|
continue;
|
||||||
|
|
||||||
vty_out(vty, " BSC lac: %d nr: %d%s",
|
vty_out(vty, " BSC lac: %d nr: %d%s",
|
||||||
conf->lac, conf->nr, VTY_NEWLINE);
|
conf->lac, conf->nr, VTY_NEWLINE);
|
||||||
vty_out(vty, " SCCP Connnections %lu total, %lu calls%s",
|
vty_out(vty, " SCCP Connnections %lu total, %lu calls%s",
|
||||||
|
Reference in New Issue
Block a user