diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-11-02 14:49:35 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-11-02 15:39:31 +0100 |
commit | bc9d9aced8c174bbb5fc265ec746621d31344be0 (patch) | |
tree | b5dc1666da0f145b9239e9a8be1e0dac1db4d8ec /src/gb/gprs_bssgp.c | |
parent | 16fe8dab7c1fede87f6bdbfbbcbf19f64d60648a (diff) |
stats: Limit reporting by class id
This commit adds class_id fields to the rate_ctr and stat_item group
descriptions. The stats reporter code is extended to only process
groups whose class_id does not exceed a per reporter max_class level.
If the class_id is not set, the code assumes 'global' for groups with
idx == 0 and 'subscriber' otherwise.
The following vty command is added to config-stats:
level (global|peer|subscriber) Set the maximum group level
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gb/gprs_bssgp.c')
-rw-r--r-- | src/gb/gprs_bssgp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index fe4fccae..e3e69c9c 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -31,6 +31,7 @@ #include <osmocom/gsm/tlv.h> #include <osmocom/core/talloc.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/stats.h> #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/gprs/gprs_ns.h> @@ -54,6 +55,7 @@ static const struct rate_ctr_group_desc bssgp_ctrg_desc = { .group_description = "BSSGP Peer Statistics", .num_ctr = ARRAY_SIZE(bssgp_ctr_description), .ctr_desc = bssgp_ctr_description, + .class_id = OSMO_STATS_CLASS_PEER, }; LLIST_HEAD(bssgp_bvc_ctxts); |