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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Apr 30 12:38:38 UTC 2021


pespin 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;
> Yes, hopefully we always see very nearly zero downtime. […]
I'm still not getting it, I'm sorry. Or maybe I'm getting it but I still find it really strange.
So, the idea of the BTS_STAT_DOWNTIME counter, as you wrote it, is to:
* Be 0 or nearly 0 whenever the BTS is UP and running
* Be in the range [0, BTS_DOWNTIME_SAMPLE_INTERVAL] whenever the BTS is down

So being it a [0, BTS_DOWNTIME_SAMPLE_INTERVAL] range, I don't see much of a use regarding the value other than signalling Up vs DOWN state, at which point maybe having a 0-1 value is good enough.

In case we don't agree on the range being [0, BTS_DOWNTIME_SAMPLE_INTERVAL] per your implementation, let's, my assumptions reading the code are:
- bts_record_downtime() is called every BTS_DOWNTIME_SAMPLE_INTERVAL, and sets bts->last_uptime_read to now() every time, meaning that when bts_record_downtime() runs, bts->last_uptime_read will always contain at most now()-BTS_DOWNTIME_SAMPLE_INTERVAL.
- if BTS is up: downtime_seconds = BTS_DOWNTIME_SAMPLE_INTERVAL - uptime_seconds = 0.
- if BTS is down, it means bts->last_uptime_read was set to now() at some point in the last [0, BTS_DOWNTIME_SAMPLE_INTERVAL] interval (it cannot be less than now()-BTS_DOWNTIME_SAMPLE_INTERVAL because it would have already been updated by previous run of bts_record_downtime().

So please, if I'm wrong feel free to explain it to me.



-- 
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 <michael at kapsulate.com>
Gerrit-Assignee: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: dexter <pmaier at sysmocom.de>
Gerrit-Comment-Date: Fri, 30 Apr 2021 12:38:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: iedemam <michael at kapsulate.com>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/467918ec/attachment.htm>


More information about the gerrit-log mailing list