bts: Add new stats to detect TBF allocation failure reasons
This is specially useful to detect for instance if a cell is handling
too many users, ending up in TFI or USF exhaustions. This information
can be later in the future used to tune TBF allocation algorithm behavior
(either manually/statially through config file, or
automatically/dynamically in code based on some thresholds).
Related: OS#5042
Change-Id: I5402e937ff8d800684655e500ef8e5c867141dc3
diff --git a/src/bts.cpp b/src/bts.cpp
index 8d1fb3f..55d45b8 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -100,7 +100,11 @@
{ "tbf:reused", "TBF Reused "},
{ "tbf:alloc:algo-a", "TBF Alloc Algo A "},
{ "tbf:alloc:algo-b", "TBF Alloc Algo B "},
- { "tbf:alloc:failed", "TBF Alloc Failure "},
+ { "tbf:alloc:failed", "TBF Alloc Failure (any reason)"},
+ { "tbf:alloc:failed:no_tfi", "TBF Alloc Failure (TFIs exhausted)"},
+ { "tbf:alloc:failed:no_usf", "TBF Alloc Failure (USFs exhausted)"},
+ { "tbf:alloc:failed:no_slot_combi", "TBF Alloc Failure (No valid UL/DL slot combination found)"},
+ { "tbf:alloc:failed:no_slot_avail", "TBF Alloc Failure (No slot available)"},
{ "rlc:sent", "RLC Sent "},
{ "rlc:resent", "RLC Resent "},
{ "rlc:restarted", "RLC Restarted "},
@@ -609,6 +613,7 @@
if (best_trx_nr == 0xff || best_cnt == 0) {
LOGP(DRLCMAC, LOGL_NOTICE, "No TFI available (suggested TRX: %d).\n", use_trx);
+ bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_FAIL_NO_TFI);
return -EBUSY;
}