How can I monitor how many threads and memory usage in my JVM or Eclipse?

11,719

Solution 1

You can try jvisualvm.exe You can find it in jdk/bin directory. It's great tool. Read here on the usage of it.

If you want to get the status in your java code, you can try JMX. Google the keywords "JMX Monitoring and Management".

Solution 2

JProfiler provides a lot of useful information on threading and monitor contention and it has an eclipse plugin.

See these screen casts for monitor contention analysis:

Disclaimer: My company develops JProfiler

Solution 3

in Eclipse, run the program in debug mode (this will also open the debug perspective). In that you can see how many threads are running. The best tool for this could be an inbuilt profiler . I guess JVM has a profiling tool as well or you can use third party profiling tool like JProfiler or yourkit. http://www.yourkit.com/

Share:
11,719
DNB5brims
Author by

DNB5brims

Updated on June 07, 2022

Comments

  • DNB5brims
    DNB5brims almost 2 years

    I want to monitor the memory usage and threading, how can I do on the Eclipse or JVM? Thanks.