CurrentConnectionsCount seems to give incorrect value.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CurrentConnectionsCount seems to give incorrect value.

bansalp
Hi,

There is a difference of some 40 odd connection between value provided by current connections count and what I get by using lsof command and by counting individual connection count from activemq admin command.

1. CurrentConnectionsCount:
activemq-admin query  --view CurrentConnectionsCount --jmxurl service:jmx:rmi:///jndi/rmi://localhost:9006/jmxrmi

2. lsof :
lsof -iTCP -a -sTCP:^LISTEN -a -p pid

3. Counting each connection:
activemq-admin query --objname type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=*,connectionViewType=remoteAddress,connectionName=* --jmxurl service:jmx:rmi:///jndi/rmi://localhost:9006/jmxrmi

Value from 2nd and 3rd command matches, but value of 1st command is lesser than value of 2nd and 3rd command.

Can somebody help, am I doing something wrong?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: CurrentConnectionsCount seems to give incorrect value.

Tim Bain
I've seen the same thing when manually examining the list of connections in
JConsole.  I've always assumed that it showed all connections that had been
made since the broker started rather than all current connections and that
that was intentional, but I never tried to confirm that assumption, so I'm
curious to hear what the answer turns out to be.
On Dec 25, 2014 12:01 AM, "bansalp" <[hidden email]> wrote:

> Hi,
>
> There is a difference of some 40 odd connection between value provided by
> current connections count and what I get by using lsof command and by
> counting individual connection count from activemq admin command.
>
> 1. CurrentConnectionsCount:
> activemq-admin query  --view CurrentConnectionsCount --jmxurl
> service:jmx:rmi:///jndi/rmi://localhost:9006/jmxrmi
>
> 2. lsof :
> lsof -iTCP -a -sTCP:^LISTEN -a -p pid
>
> 3. Counting each connection:
> activemq-admin query --objname
>
> type=Broker,brokerName=localhost,connector=clientConnectors,connectorName=*,connectionViewType=remoteAddress,connectionName=*
> --jmxurl service:jmx:rmi:///jndi/rmi://localhost:9006/jmxrmi
>
> Value from 2nd and 3rd command matches, but value of 1st command is lesser
> than value of 2nd and 3rd command.
>
> Can somebody help, am I doing something wrong?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/CurrentConnectionsCount-seems-to-give-incorrect-value-tp4689268.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: CurrentConnectionsCount seems to give incorrect value.

bansalp
If these were to be all the connection ever made then lsof won't show these connection + there is one counter for that TotalConnectionsCount and its value is way higher than value returned by 2nd or 3rd command as it do count for all the connections ever made to broker.
Reply | Threaded
Open this post in threaded view
|

Re: CurrentConnectionsCount seems to give incorrect value.

Tim Bain
Sorry, I misread what you wrote and thought #1 and #3 matched.
If these were to be all the connection ever made then lsof won't show these
connection + there is one counter for that TotalConnectionsCount and its
value is way higher than value returned by 2nd or 3rd command as it do count
for all the connections ever made to broker.




--
View this message in context:
http://activemq.2283324.n4.nabble.com/CurrentConnectionsCount-seems-to-give-incorrect-value-tp4689268p4689272.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.