I am trying to monitor the memory usage of my java program. As of now I am using 'Top'. Top is a command line tool that shows you the memory usage of your program. The out put example will is similiar as the following:

$# top -p

Output:

PID: User: VIRT: 513M %MEM: 25.1

I am trying to find a better memory monitoring tool that can show me what are the java objects that resides in the memory, their size, etc.

Anyone has a suggestion.

Thank you.

Cheers,

link|improve this question

67% accept rate
feedback

1 Answer

You can use VisualVM to monitor memory usage in Java processes. As well as monitoring the overall heap it also includes a memory profiler so you can see what objects are using the most memory.

It is also included in the latest JDK as jvisualvm.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.