user81940: I am running a c-lightning node and want to know how many btc I am owning on this wallet and how many I can spend. lightning-cli listchannels does not help. What do I need to do? 

user44280: If you have jq installed, you can ask it to sum up all the values for you. For example, to get the total amount stored in your node’s UTXOs:
lightning-cli listfunds | jq '[.outputs[].value] | add'

If you want your output in BTC rather than satoshis, you can divide it right away:
lightning-cli listfunds | jq '[.outputs[].value] | add / 100000000'


user81940: Use the RPC-Interface listfunds lightning-cli listfunds which lists all payment channels and UTXO. 
If you wish to have a more nicely display you can use this small tool: https://github.com/renepickhardt/lightning-helpers
git clone https://github.com/renepickhardt/lightning-helpers.git

cd lightning-helpers
sudo make install
listfunds

it aggregates everything so that you can see your total funds. Also you can add a parameter to change the unit of display. 
If you don't trust a third party tool and don't want to read the source code you can use this little shell script: 
utxo values: 
lightning-cli listfunds | grep "value" | sed 's/      "value": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'
total channel balance on your side: 
lightning-cli listfunds | grep "channel_sat" | sed 's/      "channel_sat": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'

81940: <p>I am running a c-lightning node and want to know how many btc I am owning on this wallet and how many I can spend. <code>lightning-cli listchannels</code> does not help. What do I need to do? </p>
 44280: <p>If you have <a href="https://stedolan.github.io/jq/" rel="nofollow noreferrer"><code>jq</code></a> installed, you can ask it to sum up all the values for you. For example, to get the total amount stored in your node’s UTXOs:</p>
<pre><code>lightning-cli listfunds | jq '[.outputs[].value] | add'
</code></pre>
<p>If you want your output in BTC rather than satoshis, you can divide it right away:</p>
<pre><code>lightning-cli listfunds | jq '[.outputs[].value] | add / 100000000'
</code></pre>
 81940: <p>Use the <a href="https://github.com/ElementsProject/lightning/blob/master/doc/lightning-listfunds.7.txt" rel="nofollow noreferrer">RPC-Interface listfunds</a> <code>lightning-cli listfunds</code> which lists all payment channels and UTXO. </p>

<p>If you wish to have a more nicely display you can use this small tool: <a href="https://github.com/renepickhardt/lightning-helpers" rel="nofollow noreferrer">https://github.com/renepickhardt/lightning-helpers</a></p>

<pre><code>git clone https://github.com/renepickhardt/lightning-helpers.git

cd lightning-helpers
sudo make install
listfunds
</code></pre>

<p>it aggregates everything so that you can see your total funds. Also you can add a parameter to change the unit of display. </p>

<p>If you don't trust a third party tool and don't want to read the source code you can use this little shell script: </p>

<p>utxo values: </p>

<p><code>lightning-cli listfunds | grep "value" | sed 's/      "value": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'</code></p>

<p>total channel balance on your side: </p>

<p><code>lightning-cli listfunds | grep "channel_sat" | sed 's/      "channel_sat": //g' | sed 's/,//g' | awk '{s+=$1} END {print s}'</code></p>
