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

Re: Connections info

Note that one "user"/application can open multiple connections. You have also the number of Thrift connections available in JMX if you run a legacy application.

Max is right, regarding where they're come from you can use lsof. For instance on AWS - but you can adapt it for your needs:


ssh $IP "sudo lsof -i -n | grep 9042 | grep -Po '(?<=->)[^:]+' | sort -u" | xargs -P 20 -I '{}' aws --output json --region $REGION ec2 describe-instances --filter Name=private-ip-address,Values={} --query 'Reservations[].Instances[*].Tags[*]' | jq '.[0][0] | map(select(.Key == "Name")) | .[0].Value' | sort | uniq -c

You'll have number of instances grouped by AWS name :
      3 "name_ABC"
     15 "name_example"
     37 "name_test"


Le vendredi 5 octobre 2018 à 06:28:51 UTC+2, 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?