diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-06-10 00:20:12 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-06-10 15:12:38 +0200 |
commit | efbdee9a5c9f511ea8f5b928e4f7076120ba587b (patch) | |
tree | f12ae759e8b1be66796ca9e247300a5f3e2ae6fb /openbsc/src/gprs/gprs_sgsn.c | |
parent | bb35c45a0202e24e76d17900dbe2d5264136ef8d (diff) |
[GPSR] SGSN: Keep traffic counters for each PDP context
Diffstat (limited to 'openbsc/src/gprs/gprs_sgsn.c')
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index d104c4e81..9a76cee8e 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -61,6 +61,20 @@ static const struct rate_ctr_group_desc mmctx_ctrg_desc = { .ctr_desc = mmctx_ctr_description, }; +static const struct rate_ctr_desc pdpctx_ctr_description[] = { + { "udata.packets.in", "User Data Messages ( In)" }, + { "udata.packets.out", "User Data Messages (Out)" }, + { "udata.bytes.in", "User Data Bytes ( In)" }, + { "udata.bytes.out", "User Data Bytes (Out)" }, +}; + +static const struct rate_ctr_group_desc pdpctx_ctrg_desc = { + .group_name_prefix = "sgsn.pdpctx", + .group_description = "SGSN PDP Context Statistics", + .num_ctr = ARRAY_SIZE(pdpctx_ctr_description), + .ctr_desc = pdpctx_ctr_description, +}; + static int ra_id_equals(const struct gprs_ra_id *id1, const struct gprs_ra_id *id2) { @@ -182,6 +196,7 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm, pdp->mm = mm; pdp->nsapi = nsapi; + pdp->ctrg = rate_ctr_group_alloc(pdp, &pdpctx_ctrg_desc, nsapi); llist_add(&pdp->list, &mm->pdp_list); llist_add(&pdp->g_list, &sgsn_pdp_ctxts); |