aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-11-13 05:20:47 +0100
committerHarald Welte <laforge@gnumonks.org>2012-11-24 22:28:44 +0100
commit2bad1363e9acd340eff27bc0b3856ee6290c096c (patch)
treebe25222fe6a837ff97c0a2a09769dc08684752be /src/common/vty.c
parent9858a7defe4aee4e3a2fd59b7b57d9026fd91d04 (diff)
Add VTY configuration of paging queue size and lifetime of paging records
This may be adding bells and whistles that nobody wants to touch, but at least for current analysis/optimiziation they are useful to have. Later on they should probably be removed again and/or obsoleted by OML messages for configuration of paging behaviour by the BSC.
Diffstat (limited to 'src/common/vty.c')
-rw-r--r--src/common/vty.c47
1 files changed, 45 insertions, 2 deletions
diff --git a/src/common/vty.c b/src/common/vty.c
index 225ff39b..1d12e43a 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -186,6 +186,10 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " rtp bind-ip %s%s", btsb->rtp_bind_host, VTY_NEWLINE);
vty_out(vty, " rtp jitter-buffer %u%s", btsb->rtp_jitter_buf_ms,
VTY_NEWLINE);
+ vty_out(vty, " paging queue-size %u%s", btsb->paging_q_len,
+ VTY_NEWLINE);
+ vty_out(vty, " paging lifetime %u%s", btsb->paging_lifetime,
+ VTY_NEWLINE);
bts_model_config_write_bts(vty, bts);
@@ -328,6 +332,42 @@ DEFUN(cfg_bts_rtp_jitbuf,
return CMD_SUCCESS;
}
+#define PAG_STR "Paging related parameters\n"
+
+DEFUN(cfg_bts_paging_queue_size,
+ cfg_bts_paging_queue_size_cmd,
+ "paging queue-size <1-1024>",
+ PAG_STR "Maximum length of BTS-internal paging queue\n"
+ "Maximum length of BTS-internal paging queue\n")
+{
+ struct gsm_bts *bts = vty->index;
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+
+ btsb->paging_q_len = atoi(argv[0]);
+ paging_config(btsb->paging_state, btsb->paging_q_len,
+ btsb->paging_lifetime);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_bts_paging_lifetime,
+ cfg_bts_paging_lifetime_cmd,
+ "paging lifetime <0-60>",
+ PAG_STR "Maximum lifetime of a paging record\n"
+ "Maximum lifetime of a paging record (secods)\n")
+{
+ struct gsm_bts *bts = vty->index;
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+
+ btsb->paging_lifetime = atoi(argv[0]);
+ paging_config(btsb->paging_state, btsb->paging_q_len,
+ btsb->paging_lifetime);
+
+ return CMD_SUCCESS;
+}
+
+
+
/* ======================================================================
* SHOW
* ======================================================================*/
@@ -358,8 +398,9 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
net_dump_nmstate(vty, &bts->mo.nm_state);
vty_out(vty, " Site Mgr NM State: ");
net_dump_nmstate(vty, &bts->site_mgr.mo.nm_state);
- vty_out(vty, " Paging: %u requests in queue%s",
- paging_queue_length(btsb->paging_state), VTY_NEWLINE);
+ vty_out(vty, " Paging: Queue size %u, occupied %u, lifetime %us%s",
+ btsb->paging_q_len, paging_queue_length(btsb->paging_state),
+ btsb->paging_lifetime, VTY_NEWLINE);
#if 0
vty_out(vty, " Paging: %u pending requests, %u free slots%s",
paging_pending_requests_nr(bts),
@@ -487,6 +528,8 @@ int bts_vty_init(const struct log_info *cat)
install_element(BTS_NODE, &cfg_bts_band_cmd);
install_element(BTS_NODE, &cfg_description_cmd);
install_element(BTS_NODE, &cfg_no_description_cmd);
+ install_element(BTS_NODE, &cfg_bts_paging_queue_size_cmd);
+ install_element(BTS_NODE, &cfg_bts_paging_lifetime_cmd);
/* add and link to TRX config node */
install_element(BTS_NODE, &cfg_bts_trx_cmd);