To collect heap dump from jrcmd , we can use below command
jrcmd pid print_object_summery
Prints details of all the instances on the heap on a per-class basis, together with a differential value of how the memory usage has changed. Columns: a) Percentage of heap that objects of this class occupy, b) The total size occupied by the instances of a specific class, c) The number of instances of a specific class, d) The change in size from the first invocation of this command, e) The full name of the class. Check the next sample run, where we might have a problem with objects of class
/usr/java/jrockit-28.2.5/bin/jrcmd 18138 print_object_summary > heapdump
example out put like this:
18138:
--------- Detailed Heap Statistics: ---------
40.5% 1336739k 31856677 +0k [C
23.2% 764694k 2569326 +0k [Ljava/lang/Object;
22.7% 749887k 31995192 +0k java/lang/String
2.6% 84918k 776395 +0k atg/adapter/gsa/GSAItem
1.5% 50745k 42095 +11k [B
0.9% 29182k 1245133 +0k java/util/HashMap$Entry
0.9% 28747k 1839867 +0k java/lang/Double
0.8% 26071k 129558 +0k [Ljava/util/HashMap$Entry;
0.7% 22059k 1411807 +0k java/lang/Integer
0.6% 18175k 775504 +0k atg/adapter/gsa/SingleValueGSAId
0.5% 18021k 768916 +0k atg/core/util/SmallHashMap
0.5% 17195k 550244 +0k java/sql/Timestamp
3299105kB total ---
--------- End of Detailed Heap Statistics ---
If you want to check threadump using Jrcmd check here:
jrcmd pid print_object_summery
Prints details of all the instances on the heap on a per-class basis, together with a differential value of how the memory usage has changed. Columns: a) Percentage of heap that objects of this class occupy, b) The total size occupied by the instances of a specific class, c) The number of instances of a specific class, d) The change in size from the first invocation of this command, e) The full name of the class. Check the next sample run, where we might have a problem with objects of class
/usr/java/jrockit-28.2.5/bin/jrcmd 18138 print_object_summary > heapdump
example out put like this:
18138:
--------- Detailed Heap Statistics: ---------
40.5% 1336739k 31856677 +0k [C
23.2% 764694k 2569326 +0k [Ljava/lang/Object;
22.7% 749887k 31995192 +0k java/lang/String
2.6% 84918k 776395 +0k atg/adapter/gsa/GSAItem
1.5% 50745k 42095 +11k [B
0.9% 29182k 1245133 +0k java/util/HashMap$Entry
0.9% 28747k 1839867 +0k java/lang/Double
0.8% 26071k 129558 +0k [Ljava/util/HashMap$Entry;
0.7% 22059k 1411807 +0k java/lang/Integer
0.6% 18175k 775504 +0k atg/adapter/gsa/SingleValueGSAId
0.5% 18021k 768916 +0k atg/core/util/SmallHashMap
0.5% 17195k 550244 +0k java/sql/Timestamp
3299105kB total ---
--------- End of Detailed Heap Statistics ---
If you want to check threadump using Jrcmd check here: