I want to monitor the memory usage and threading, how can I do on the Eclipse or JVM? Thanks.
3 Answers
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".
-
1Good answer. Make it better by adding reference the tools you have mentioned. – ManuPK Mar 24 '12 at 08:06
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

- 46,523
- 10
- 71
- 102
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/

- 627
- 1
- 8
- 18