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/.

iedemam gerrit-no-reply at lists.osmocom.org
Fri Apr 30 11:50:18 UTC 2021


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

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


Patch Set 4:

(3 comments)

Hi Pepsin,

Thanks for the review. I've addressed the first two items. The third has hopefully been explained better now but I'm open to suggestions.

Regards,
-Michael

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@571 
PS4, Line 571: 	if (clock_gettime(CLOCK_MONOTONIC, &tp) != 0) {
> osmo_clock_gettime
Oops, sorry. I missed this from a previous comment. Fixed now.


https://gerrit.osmocom.org/c/osmo-bsc/+/23234/4/src/osmo-bsc/bts.c@580 
PS4, Line 580: 	if (uptime_seconds < 0) {
> This cannot happen with a monotonic clock? Unless you run for crazy amount of years without reboot w […]
True. My consideration was that there may be scheduling jitter between reading uptime and setting the last_uptime_read state. I forgot we're running in a single thread though and this will never happen. Removed.


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;
> There's something here I'm not really following. […]
Yes, hopefully we always see very nearly zero downtime. :-) The last_uptime_read variable is also updated outside of this loop when a connection is reestablished. Let's say that happens half-way between calls to this timer loop. Now instead of seeing 10 seconds of elapsed uptime, we will only see 5 seconds of "new" uptime. This gives us 5 seconds which were interrupted in some way, signaling downtime.

Testing this locally by disrupting the BTS<->BSC connection results in seemingly accurate downtime numbers. It could perhaps be improved but I'm satisfied with the result so far. Suggestions welcome.



-- 
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: 4
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 11:50:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
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/7ccdf300/attachment.htm>


More information about the gerrit-log mailing list