<p style="white-space: pre-wrap; word-wrap: break-word;">Hi guys,</p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks for the feedback as always!</p><p style="white-space: pre-wrap; word-wrap: break-word;">Patch updated to be even more straightforward. Now all I'm doing is adding a timer which records bts_uptime() to a stat_item.</p><p style="white-space: pre-wrap; word-wrap: break-word;">-Michael</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c">File src/osmo-bsc/bts.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@564">Patch Set #6, Line 564:</a> <code style="font-family:monospace,monospace">      /* if the BTS is not up, skip this update */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">With this check I think the uptime will stay at whatever value it was before a BTS disconnected and  […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@576">Patch Set #6, Line 576:</a> <code style="font-family:monospace,monospace">     uptime_seconds = difftime(tp.tv_sec, bts->uptime);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">ACK</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Now that we've come full circle, you're absolutely correct. We're back to simply recording uptime in a stat_item.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234">change 23234</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c </div>
<div style="display:none"> Gerrit-Change-Number: 23234 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: iedemam <michael@kapsulate.com> </div>
<div style="display:none"> Gerrit-Assignee: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 04 May 2021 10:43:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>