How to find the heap memory usage of your JVM instance?

Java JMX API has very simple API to find out the memory usage of a JVM instance. In the below given example we will find the memory usage of a JVM instance.

Console output

Continue reading…

 

How to identify deadlock in java?

Java Management Extension provides a powerful APIs to find out all details about the JVM. Today we will write a simple program to find out dead lock in java using JMX API. The intention of this program is only to find the dead lock, the program which is used to create the dead lock should [...]
Continue reading…

 

How to find all live threads in JVM?

Java JMX API provides you some useful classes to find out details about your JVM. One of those classes is ManagementFactory, This class provides API to find meta data about the JVM. In the below given example we will find all the live threads in the JVM and its state.

Console output.

Continue reading…