<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.sstatic.net/rgyw4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rgyw4.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2019-08-29T11:37:44.157Z
2019-08-29T11:37:44.157Z
Ilya Evdokimov
<p>the command you are looking for is</p>
<pre><code>admin@myNode:~ $ lncli getchaninfo --chan_id CHANNELIDVALUE
</code></pre>

CC BY-SA 4.0
2021-04-20T07:41:06.660Z
pretty much the same answer that had already been accepted years ago.
leevancleef
CC BY-SA 4.0
2021-04-18T19:53:05.717Z
2021-04-18T19:53:05.717Z
HaGra
<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>

<lightning-network><lightning-network-daemon><ln-closing-channels>
For how long has a channel been inactive?
Dalit Sairio
# For how long has a channel been inactive?

(Asked by: username_0 on 2019-08-29)

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 querying`lncli listchannels --inactive_only`, but the result does not show any indicator about how long that channel has been inactive.

**Tags:** lightning-network, lightning-network-daemon, ln-closing-channels


---

## 2 answers

### Answer by username_1 on 2019-08-29. Score: 3 | Accepted answer

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.

[![enter image description here](https://i.sstatic.net/rgyw4.png)](https://i.sstatic.net/rgyw4.png)


---

### Answer by username_2 on 2021-04-18. Score: 0

the command you are looking for is
admin@myNode:~ $ lncli getchaninfo --chan_id CHANNELIDVALUE

> **Comments:**
> **username_3**: pretty much the same answer that had already been accepted years ago.  

---

