Hey All,
I'm writing some LLD templates for a Tomcat application and I've run into a little trouble. So I'm trying to extract "java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.*". For the most part, everything works as expected and I can get top-level composite data like "GcThreadCount" etc. There are lower levels though like memoryUsageAfterGc. memoryUsageAfterGc and memoryUsageBeforeGc uses a map to store data. My question is how do I access the data map?
Here's an example, so I have the bean java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.memoryUsageBeforeGc, nested within that bean there is a map with the key "Code Cache" with information about the memory state before the last garbage collection was triggered. Instinct tells me to use this format but it doesn't work java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.memoryUsageBeforeGc['commited']
Thank you for any information provided.
EDIT:
To elaborate, here's the output from jmxterm:
$>get LastGcInfo.memoryUsageAfterGc
#mbean = java.lang:name=G1 Young Generation,type=GarbageCollector:
LastGcInfo.memoryUsageAfterGc = {
( G1 Old Gen ) = {
key = G1 Old Gen;
value = {
committed = 877658112;
init = 1017118720;
max = 3221225472;
used = 529530880;
};
};
( G1 Perm Gen ) = {
key = G1 Perm Gen;
value = {
committed = 98566144;
init = 20971520;
max = 536870912;
used = 97586816;
};
};
( Code Cache ) = {
key = Code Cache;
value = {
committed = 11599872;
init = 2555904;
max = 50331648;
used = 11391936;
};
};
( G1 Eden Space ) = {
key = G1 Eden Space;
value = {
committed = 175112192;
init = 56623104;
max = -1;
used = 0;
};
};
( G1 Survivor Space ) = {
key = G1 Survivor Space;
value = {
committed = 20971520;
init = 0;
max = -1;
used = 20971520;
};
};
};
$>bean
java.lang:name=G1 Young Generation,type=GarbageCollector
How do I access: G1 Old Gen.committed
I'm writing some LLD templates for a Tomcat application and I've run into a little trouble. So I'm trying to extract "java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.*". For the most part, everything works as expected and I can get top-level composite data like "GcThreadCount" etc. There are lower levels though like memoryUsageAfterGc. memoryUsageAfterGc and memoryUsageBeforeGc uses a map to store data. My question is how do I access the data map?
Here's an example, so I have the bean java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.memoryUsageBeforeGc, nested within that bean there is a map with the key "Code Cache" with information about the memory state before the last garbage collection was triggered. Instinct tells me to use this format but it doesn't work java.lang:type=GarbageCollector,name=G1 Young Generation",LastGcInfo.memoryUsageBeforeGc['commited']
Thank you for any information provided.
EDIT:
To elaborate, here's the output from jmxterm:
$>get LastGcInfo.memoryUsageAfterGc
#mbean = java.lang:name=G1 Young Generation,type=GarbageCollector:
LastGcInfo.memoryUsageAfterGc = {
( G1 Old Gen ) = {
key = G1 Old Gen;
value = {
committed = 877658112;
init = 1017118720;
max = 3221225472;
used = 529530880;
};
};
( G1 Perm Gen ) = {
key = G1 Perm Gen;
value = {
committed = 98566144;
init = 20971520;
max = 536870912;
used = 97586816;
};
};
( Code Cache ) = {
key = Code Cache;
value = {
committed = 11599872;
init = 2555904;
max = 50331648;
used = 11391936;
};
};
( G1 Eden Space ) = {
key = G1 Eden Space;
value = {
committed = 175112192;
init = 56623104;
max = -1;
used = 0;
};
};
( G1 Survivor Space ) = {
key = G1 Survivor Space;
value = {
committed = 20971520;
init = 0;
max = -1;
used = 20971520;
};
};
};
$>bean
java.lang:name=G1 Young Generation,type=GarbageCollector
How do I access: G1 Old Gen.committed
Comment