# In node red how to get the number of TCP connections or websocket connections count

**URL:** <https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870>\
**Category:** General\
**Created:** [17 December 2018 07:43 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870 "2018-12-17T07:43:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satishpujari](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Satishpujari](https://discourse.nodered.org/u/Satishpujari)\
**Post date:** [17 December 2018 07:43 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/1 "2018-12-17T07:43:30Z")

</div>

In node red how to get the number of TCP connections or websocket connections count to create the dashboard.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2018 08:29 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/2 "2018-12-17T08:29:31Z")

</div>

Can you explain a bit more ? The node-red-dashboard works without you needing to know this.  
The ui\_control node will give you a message whenever a client connects, disconnects etc if you need that.  
The TCP node does provide a status with the number of connections, that can be read by the status node.

---

<div class="post-metadata">

**Author:** ![Satishpujari](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Satishpujari](https://discourse.nodered.org/u/Satishpujari)\
**Post date:** [17 December 2018 08:41 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/3 "2018-12-17T08:41:28Z")

</div>

I want to show the number of connections happened in dashboard, how to show??

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2018 08:51 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/4 "2018-12-17T08:51:33Z")

</div>

which connections ? connections from the dashboard ? connections from some tcp port you have mentioned \> - please help by explaining more detail what you want.

---

<div class="post-metadata">

**Author:** ![Satishpujari](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Satishpujari](https://discourse.nodered.org/u/Satishpujari)\
**Post date:** [17 December 2018 09:37 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/5 "2018-12-17T09:37:18Z")

</div>

I have some devices those are connected to tcp. i want to see those connected devices count in dashboard. is it possible .please let me know if you want any details.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 December 2018 09:43 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/6 "2018-12-17T09:43:44Z")

</div>

If there is a clever command line tool you could use then you can call that using an exec node and then parse the output.

---

<div class="post-metadata">

**Author:** ![Satishpujari](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Satishpujari](https://discourse.nodered.org/u/Satishpujari)\
**Post date:** [17 December 2018 09:43 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/7 "2018-12-17T09:43:52Z")

</div>

![tcp](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/54f6827f12e54a6099faa5f1f286a7274588bc6a.png)

i Have 8 connections as of now i want to see those connection in dashboard.is it possible

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2018 09:45 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/8 "2018-12-17T09:45:21Z")

</div>

so use the status node as I first suggested.

---

<div class="post-metadata">

**Author:** ![Satishpujari](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Satishpujari](https://discourse.nodered.org/u/Satishpujari)\
**Post date:** [17 December 2018 10:24 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/9 "2018-12-17T10:24:15Z")

</div>

But Status node is not from dashboard . it's from input side. i tried that.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2018 12:57 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/10 "2018-12-17T12:57:22Z")

</div>

... so is the tcp node... so tcp node -\> status node -\> change msg as you require for dashboard -\> ui\_text node (or whatever you want on dashboard)

---

<div class="post-metadata">

**Author:** ![hugobox](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hugobox/32/2948_2.png) [@hugobox](https://discourse.nodered.org/u/hugobox)\
**Post date:** [17 December 2018 13:18 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/11 "2018-12-17T13:18:38Z")

</div>

Can we get the number of dashboard websocket connections through ui-control node?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2018 18:47 UTC](https://discourse.nodered.org/t/in-node-red-how-to-get-the-number-of-tcp-connections-or-websocket-connections-count/5870/12 "2018-12-17T18:47:30Z")

</div>

If you count them yourself yes.
