Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBoss view active user sessions

We have a JBoss server with a single J2EE on it. I wish to find out who are the current active users using that application. Does JBoss give me any utilities that lets me view those existing sessions? (NOT the count, but who all are logged in) The question is kinda lame, but so is my JBoss knowledge :)

I checked the JBoss community, but it only had a couple of relative unanswered questions there. The information i'm looking for would help me in maintenance cycles. I do not wish to reboot the system when users are still using it. We also need to keep a track of any illegal activities on our server. Hence the requirement.

Would appreciate any pointers :)

Regards, Abhi

like image 444
Abhi Avatar asked Jul 22 '10 17:07

Abhi


2 Answers

http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/clustering-http-monitor.html

  1. Enter on your JMX console : ex: ip:port/jmx-console/
  2. Look for "jboss.cache:service=TomcatClusteringCache" on objectName Filter and Apply.
  3. Enter on MBean jboss.cache:service=TomcatClusteringCache (the first option, ignore interceptors)
  4. Look for "printDetails" and invoke it. It shows all opened sessions and attributes.
like image 143
Eduardo Fabricio Avatar answered Mar 30 '23 05:03

Eduardo Fabricio


In CLI:

First of all connect to the server using jboss-cli.sh (it is inside /bin ):

jboss-cli.sh --connect --controller=<ip-server>:9990

For standalone mode:

[standalone@ip-address:9999 /] /deployment=${deployment-name}/subsystem=undertow:read-attribute(name=active-sessions)

For domain mode:

[domain@ip-address:9999 /] /host=${host-name}/server=${server-name}/deployment=${deployment-name}/subsystem=undertow:read-attribute(name=active-sessions)

In Web Management Console:

Access web console using "http://ip-address:9990/"

Select "Deployments" from the left bottom corner.

According to the mode you use:

For standalone mode:

From left panel, select:
"deployment"-"${deploymentname}"-"subsystem"-"undertow",

Click on "Data" tab on the main page

For domain mode:

From left panel, select:
"Server Groups"-"${server-group-name}"-"deployment"-"${deployment-name}"-"view"-"subsystem"-"undertow" Click on "Data" tab on the main page

like image 43
Felipe Pereira Avatar answered Mar 30 '23 05:03

Felipe Pereira