If you are already using an enterprise monitoring system, then most probably you don’t need this. However, for learning or interview questions, this will help you to enable JMX & monitor essential metrics of WebSphere JVM. The good thing about this is you don’t have to install any additional software. Let’s start with the implementation…

Login into DMGR Console Click on Servers » Server Types » WebSphere application servers Click on JVM from the list you wish to monitor using JMX Expand Java and Process Management under “Server Infrastructure” and click on Process definition

 

Click on Java Virtual Machine under “Additional Properties”

Enter following in “Generic JVM arguments” box

In the above example, I have entered 9000. You must enter a unique port number to avoid conflicts.

Click on Review and Synchronize changes with nodes

It would be best if you restarted the JVM to get the port number active. To verify the port, you can use the netstat command. So now, I know JMX port for JVM is listening and ready to be connected from Jconsole. Jconsole is within the JDK package, so if you have this installed, you should see them under the java/bin folder. Alternatively, you can use find command. Execute jconsole, and it will prompt you to enter the remote process details. Here you have to give server hostname and JVM port number. Ex: localhost:9000

It will take a few seconds and connect to WebSphere JVM using JMX port. On the overview tab, you can see heap memory usage, threads, classes, and CPU usage details.

You can play around with other tabs to see what metrics you need. If you notice under the Memory tab, you will see an option to “Perform GC”. So you see it’s helpful in many ways.

So go ahead and try out in your testing environment to get familiar. Next, learn about thread dumps.

How to Enable JMX in WebSphere to Monitor using JConsole  - 76How to Enable JMX in WebSphere to Monitor using JConsole  - 19How to Enable JMX in WebSphere to Monitor using JConsole  - 4How to Enable JMX in WebSphere to Monitor using JConsole  - 81How to Enable JMX in WebSphere to Monitor using JConsole  - 73How to Enable JMX in WebSphere to Monitor using JConsole  - 60How to Enable JMX in WebSphere to Monitor using JConsole  - 88How to Enable JMX in WebSphere to Monitor using JConsole  - 84How to Enable JMX in WebSphere to Monitor using JConsole  - 68How to Enable JMX in WebSphere to Monitor using JConsole  - 19How to Enable JMX in WebSphere to Monitor using JConsole  - 27How to Enable JMX in WebSphere to Monitor using JConsole  - 74How to Enable JMX in WebSphere to Monitor using JConsole  - 23How to Enable JMX in WebSphere to Monitor using JConsole  - 77How to Enable JMX in WebSphere to Monitor using JConsole  - 88How to Enable JMX in WebSphere to Monitor using JConsole  - 75How to Enable JMX in WebSphere to Monitor using JConsole  - 1How to Enable JMX in WebSphere to Monitor using JConsole  - 89How to Enable JMX in WebSphere to Monitor using JConsole  - 52How to Enable JMX in WebSphere to Monitor using JConsole  - 40How to Enable JMX in WebSphere to Monitor using JConsole  - 68How to Enable JMX in WebSphere to Monitor using JConsole  - 75How to Enable JMX in WebSphere to Monitor using JConsole  - 71How to Enable JMX in WebSphere to Monitor using JConsole  - 27How to Enable JMX in WebSphere to Monitor using JConsole  - 58How to Enable JMX in WebSphere to Monitor using JConsole  - 25How to Enable JMX in WebSphere to Monitor using JConsole  - 8How to Enable JMX in WebSphere to Monitor using JConsole  - 65How to Enable JMX in WebSphere to Monitor using JConsole  - 5