[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connections info

Thanks will try both options

On Friday, October 5, 2018, Alain RODRIGUEZ <arodrime@xxxxxxxxx> wrote:
Hello Abdul,

I was caught by a different topic while answering, sending the message over, even though it's similar to Romain's solution.

There is the metric mentioned above, or to have more details such as the app node IP, you can use:

$ sudo netstat -tupawn | grep 9042 | grep ESTABLISHED

tcp        0      0 ::ffff:<C*node_ip>:9042   :::*                        LISTEN      -                   

tcp        0      0 ::ffff:<C*node_ip>:9042   ::ffff:<app_node_ip>:51486  ESTABLISHED -                   

tcp        0      0 ::ffff:<C*node_ip>:9042   ::ffff:<app_node_ip>:37624  ESTABLISHED -                   

tcp        0      0 ::ffff:<C*node_ip>:9042   ::ffff:<app_node_ip>:49108  ESTABLISHED - 

or to count them:

$ sudo netstat -tupawn | grep 9042 | grep ESTABLISHED | wc -l


I'm not sure about the '-tupawn' options, it gives me the format I need and I never wondered much about it I must say. Maybe some of the options are useless.

Sending this command through ssh would allow you to gather the information in one place. You can also run similar commands on the clients (Apps) toI hope that helps.

Alain Rodriguez - @arodream - alain@xxxxxxxxxxxxxxxxx
France / Spain

The Last Pickle - Apache Cassandra Consulting

Le ven. 5 oct. 2018 à 06:28, Max C. <mc_cassandra@xxxxxxxxxx> a écrit :
Looks like the number of connections is available in JMX as:


"Number of clients connected to this nodes native protocol server

As for where they’re coming from — I’m not sure how to get that from JMX.  Maybe you’ll have to use “lsof” or something to get that. 

- Max

On Oct 4, 2018, at 8:57 pm, Abdul Patel <abd786.ap@xxxxxxxxx> wrote:

Hi All,

Can we get number of users connected to each node in cassandra?
Also can we get from whixh app node they are connecting from?