Reputation: 961
I was assigned to find the root cause for Full GC issue (Garbage Collector) in our production environment. It occurs randomly and I believe the most probable case as a memory leak present in the current application. I hope to take a memory dump from our production environment (linux) and analyze using GUI tools such as Eclipse Memory Analyzer.
what is the best file format for a heap dump file to be analyzed? Is it hprof format? I am going to use jmap command to obtain a heap dump. Is it necessary to specify the "format=b" option while obtaining the memory dump?
Following is a sample command I am going to instruct our support team to run. (5980 is a sample pid).
If you believe in any better approach please let me know.
jmap -dump:format=b,file=hpdump.hprof 5980
Thanks
Upvotes: 3
Views: 11875
Reputation: 961
I was not able to take a heap dump files as space limitations in production environment. Analyzing histogram files also took me nowhere. Instead I was able to find GC logs analyzer tool, IBM GCMV that helps to analyze GC logs on some identified days of the year that caused Full GC issue.
Plotted graphs of the GC logs revealed the whole story. Meteoric rise of memory consumption could be observed in every scenario and it just took only below 10 mins to reach out maximum memory from the beginning of a certain event. I calculated time stamp of the initial rising points and compared with the server logs for corresponding time stamps. That provided strong evidences on few certain processes that frequently appeared in server logs when the rising commenced.
Upvotes: 1
Reputation: 26067
the command seems to be fine. Yes there are few other tools available to analyze the heap dump. please refer this
Upvotes: 1