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 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…