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
Mon May 3 14:15:28 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 6:

(1 comment)

Hi,

I think it's close now. Thanks for the tips in your last comment.

-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@586 
PS4, Line 586: 	int downtime_seconds = BTS_DOWNTIME_SAMPLE_INTERVAL - uptime_seconds;
> while I still prefer my proposal (due to what I mentioned already about abusing stats here), I'm fin […]
This comment helped me a lot. Thanks! We already have a "became_up" timestamp for each BTS and I was referencing it to set my last_uptime_read value. The problem is I was recording an interval for something that should be an absolute value. This is what led to all the interval keeping and tracking and could introduce drift. I also wasn't treating the stat_item properly. I was still using it as a counter and expecting a derive value from statsd.

I've now restructured the patch to be quite minimal. Every INTERVAL seconds I set the stat_item to current elapsed uptime for that BTS. Drift should be eliminated. The stat_item is now treated as a current value and not a difference-from-last value. I've also renamed a lot of the symbols to be very clear about what we're doing here.



-- 
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: 6
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: Mon, 03 May 2021 14:15:28 +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/20210503/308970fd/attachment.htm>


More information about the gerrit-log mailing list