É possível analisar a Memory Pool da JVM através da linha de comando utilizando o Twiddle.
O Twiddle é uma ferramenta de linha de comando para interagir com instâncias JMX. Utilizamos a MBean ServerInfo para listar a utilização da Memory Pool (heap e non-heap).
O twiddle está disponivel no subdiretorio bin/ da sua instalação/distribuição JBoss.
twiddle invoke jboss.system:type=ServerInfo listMemoryPools true
A saída gerada estará formatada com tags HTML. Se desejar, redirecione a saída para um arquivo e chame algum browser modo texto para uma melhor visualização:
# twiddle invoke jboss.system:type=ServerInfo listMemoryPools true > tmp.html && w3m -dump tmp.html; rm -f tmp.html
Um exemplo da saída do comando:
Total Memory Pools: 5 Pool: Code Cache (Non-heap memory) Peak Usage : init:2555904, used:29011072, committed:29229056, max:50331648 Current Usage : init:2555904, used:28915840, committed:29229056, max:50331648 |---------------------------------------| committed:27,88Mb +---------------------------------------------------------------------+ |///////////////////////////////////////| | max:48Mb +---------------------------------------------------------------------+ |---------------------------------------| used:27,58Mb Pool: Par Eden Space (Heap memory) Peak Usage : init:644349952, used:644349952, committed:644349952,max:644349952 Current Usage : init:644349952, used:327278072, committed:644349952,max:644349952 |---------------------------------------------------------------------| committed:614,5Mb +---------------------------------------------------------------------+ |/////////////////////////////////// | max:614,5Mb +---------------------------------------------------------------------+ |----------------------------------| used:312,12Mb Pool: Par Survivor Space (Heap memory) Peak Usage : init:80478208, used:80478208, committed:80478208, max:80478208 Current Usage : init:80478208, used:66237096, committed:80478208, max:80478208 |---------------------------------------------------------------------| committed:76,75Mb +---------------------------------------------------------------------+ |///////////////////////////////////////////////////////// | max:76,75Mb +---------------------------------------------------------------------+ |--------------------------------------------------------| used:63,17Mb Pool: CMS Old Gen (Heap memory) Peak Usage : init:1342177280, used:4030585864, committed:4563402752,max:4563402752 Current Usage : init:1342177280, used:3735923912, committed:4563402752,max:4563402752 |---------------------------------------------------------------------| committed:4,25Gb +---------------------------------------------------------------------+ |///////////////////////////////////////////////////////// | max:4,25Gb +---------------------------------------------------------------------+ |--------------------------------------------------------| used:3,48Gb Pool: CMS Perm Gen (Non-heap memory) Peak Usage : init:21757952, used:203043432, committed:507076608, max:536870912 Current Usage : init:21757952, used:203043432, committed:507076608,max:536870912 |-----------------------------------------------------------------| committed:483,59Mb +---------------------------------------------------------------------+ |////////////////////////// | | max:512Mb +---------------------------------------------------------------------+ |-------------------------| used:193,64Mb

Join the conversation