I am running performance test on my server, where it is fialing due to out of memory error.
To analyze the same can any one please suggest me utility/tool which can monitor the JAVA heap activities(size) on run-time basis.
Depends of if you want this live (alerting ?) or for dev purposes (stop the problem)...
Start with Visual VM (in the JDK) see if that gives you what you want, are you trying to debug the problem or alert in some way. You can use visual VM to connect live to your process (request GC etc) but its not without cost. If you want more detailed info come back ...
For debug : First steps to debug are turn on gc logs and heap dump on out of memory error (java command line), then you'll get a hprof on out of memory and load it into Eclipse MAT and / or Visual VM.
Monitoring the gc logs with a visualizer can be good for alerting of issues and to debugging problems live with no impact on the process.
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5