0
votes

I am looking for a way to get the number of user sessions on each ejabberd node in a cluster via ejabberdctl. I have been trying different commands but it seems each time I am getting the total number of user sessions on the cluster.

More specifically, I have two nodes that are running on two different servers, but joined in a cluster:

ppejabberd1@renton (master) ppejabberd2@rialto (slave)

When I run "ejabberdctl connected_users_info" I see all the connections on both nodes displayed. I can see there are 4 connections on "ppejabberd1@renton" and 10 connections on "ppejabberd2@rialto"

When I run "ejabberdctl connected_users_number", I get 14, which is the total number.

To get the per node number I tried running "ejabberdctl --node ppejabberd1@renton connected_users_number", I still get 14.

[ejabberd@renton xmpp]$ ejabberdctl --node ppejabberd1@renton connected_users_number 14 [ejabberd@renton xmpp]$ ejabberdctl --node ppejabberd2@rialto connected_users_number 14 [ejabberd@renton xmpp]$ ejabberdctl connected_users_number 14

This should be an easy enough command but I couldnt find one that works for me. Any ideas?

Thank you!

1

1 Answers

0
votes

There is no command to query the number of connected accounts per node.

But you can get the number of c2s connections in the local machine with:

$ netstat | grep localhost:xmpp-client | wc -l
2