user73223: I would like to close channels for which there is enough evidence that the remote node disappeared and won't come back.
So my idea was to check for how long a channel has been inactive, and if it is > two months to close that channel.
How could I find out for how long a channel has been inactive (in LND)? Finding out which channels are inactive is easy by queryinglncli listchannels --inactive_only, but the result does not show any indicator about how long that channel has been inactive.

user93944: You can look for "last_update" field in getchaninfo output.
Below I also submitted https://github.com/edouardparis/lntop console screenshot which does the same thing.


73223: <p>I would like to close channels for which there is enough evidence that the remote node disappeared and won't come back.
So my idea was to check for how long a channel has been inactive, and if it is > two months to close that channel.</p>

<p>How could I find out for how long a channel has been inactive (in LND)? Finding out which channels are inactive is easy by querying<code>lncli listchannels --inactive_only</code>, but the result does not show any indicator about how long that channel has been inactive.</p>
 93944: <p>You can look for "last_update" field in <code>getchaninfo</code> output.</p>

<p>Below I also submitted <a href="https://github.com/edouardparis/lntop" rel="nofollow noreferrer">https://github.com/edouardparis/lntop</a> console screenshot which does the same thing.</p>

<p><a href="https://i.stack.imgur.com/rgyw4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rgyw4.png" alt="enter image description here"></a></p>
