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:

(2 comments)

Hi guys,

Thanks for the feedback as always!

Patch updated to be even more straightforward. Now all I'm doing is adding a 
timer which records bts_uptime() to a stat_item.

-Michael

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

https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@564
PS6, Line 564:  /* if the BTS is not up, skip this update */
> With this check I think the uptime will stay at whatever value it was before 
> a BTS disconnected and  […]
Good point. I've chosen to simply always record the value as reported by 
bts_uptime(). If it's zero, the OML link died so we're back to zero uptime 
anyway. It seems like a bad idea for me to reinterpret what bts_uptime() means 
when recording it. If we want to change what the returned value should be, 
maybe it should be in bts_uptime() itself.


https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@576
PS6, Line 576:  uptime_seconds = difftime(tp.tv_sec, bts->uptime);
> ACK
Now that we've come full circle, you're absolutely correct. We're back to 
simply recording uptime in a stat_item.



--
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 <[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: Tue, 04 May 2021 10:43:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <[email protected]>
Comment-In-Reply-To: daniel <[email protected]>
Gerrit-MessageType: comment

Reply via email to