iedemam has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/23234 )

Change subject: stats: add BTS uptime counter
......................................................................


Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/23234/4/src/osmo-bsc/bts.c
File src/osmo-bsc/bts.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/23234/4/src/osmo-bsc/bts.c@586
PS4, Line 586:  int downtime_seconds = BTS_DOWNTIME_SAMPLE_INTERVAL - 
uptime_seconds;
> "Downtime is added to the stat_item. […]
I appreciate the suggestion but this is now even more complicated. Adding two 
stats and needing another separate service to derive uptime and downtime 
doesn't satisfy the goal of tracking uptime / downtime inside the BSC. Also 
stat events aren't stored with high precision after their initial transmission 
so it will be impossible to see if a BTS is up or down as soon as the UP and 
DOWN events match in granularity. Order is lost.

I agree: counting downtime if the system is completely down is impossible 
unless another separate service is monitoring it. The BSC cannot count downtime 
if itself is down.

My initial proposal was to count uptime. Counting uptime is accurate and you're 
already doing it, it's just not stored in a stat. That's all I'm trying to 
accomplish. Downtime is easily derived by subtracting uptime seconds from the 
total seconds in the time window you're looking at.

Can we go back to the initial proposal? Every X seconds, I add X seconds of 
uptime to the uptime counter stored in a stat_item. Done.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/23234
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c
Gerrit-Change-Number: 23234
Gerrit-PatchSet: 5
Gerrit-Owner: iedemam <[email protected]>
Gerrit-Assignee: daniel <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-CC: dexter <[email protected]>
Gerrit-Comment-Date: Fri, 30 Apr 2021 17:57:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <[email protected]>
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to