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

后端 未结 3 488
失恋的感觉
失恋的感觉 2020-12-17 03:26

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

相关标签:
3条回答
  • 2020-12-17 03:38

    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/

    0 讨论(0)
  • 2020-12-17 03:40

    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:

    • Locking graphs in JProfiler
    • Monitor events versus locking situations
    • Cumulating and filtering monitor events

    Disclaimer: My company develops JProfiler

    0 讨论(0)
  • 2020-12-17 03:44

    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".

    0 讨论(0)
提交回复
热议问题