Change in osmo-bsc[master]: stats: add BTS uptime counter

iedemam gerrit-no-reply at
Mon Mar 8 11:51:02 UTC 2021

iedemam has posted comments on this change. ( )

Change subject: stats: add BTS uptime counter

Patch Set 2:

> What exactly are you trying to achieve here? what is uptime?

I am considering uptime to mean the same as you've already defined it in the VTY output: the BSC and BTS have had a valid connection.

But instead of delivering this information via the VTY, I want to export it via the statsd reporter. The ultimate goal is to be able to tell from the gathered statsd data: how many seconds of downtime did we experience in a given time interval.

Counting downtime is also a possibility but OsmoBSC already contained the concept of uptime so I've used it.

This patch samples the change in uptime every X seconds and adds it to the uptime counter. This only needs to happen once per statsd reporter interval so a callback from that action might be better...or simply a way to know the current statsd reporter interval.

> In any case, none of the above is a rate counter.  Rate counters count the rate of events, such as the rate of BTS re-starts, the rate of channel allocations, etc.
> something like a stat_item might be better suited?

I don't know enough about the stats system I guess to make that call. I just want to store the number of seconds of uptime per interval. Just as we count "channel activations per interval" I thought this was the way to go. Is a stat_item a more logical fit? I'll gladly refactor to use it if so.


To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c
Gerrit-Change-Number: 23234
Gerrit-PatchSet: 2
Gerrit-Owner: iedemam <michael at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-Comment-Date: Mon, 08 Mar 2021 11:51:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list