You can find this information using JMX. See here on how to enable JMX and what variables to request.
Using the Ant JMX task, you can use:
<jmx:invoke name="Catalina:type=Manager,path=/ClusterTest,host=localhost" operation="listSessionIds" resultproperty="sessions" echo="false" delimiter=" " />
but you can use other tools, for example. JConsole
source share