Thursday, July 16, 2009

Quick steps to get heap dumps in glassfish app Server.

Step-1: export JAVA_HOME=
change ports in setup.xml if required.

Step-2: cd /glassfish

Step-3: chmod -R 777 ./lib

Step-4: ./lib/ant/bin/ant -f setup.xml

Step-5: ./bin/asadmin start-domain domain1
Get pid for the server process.

Step-6: Run following commands.

bash-3.00# kill -3 12617 if 12617 is the pid

bash-3.00# jmap -dump:format=b,file=/tmp/java_app-heap.bin 12617
Dumping heap to /tmp/java_app-heap.bin ...
Heap dump file created

bash-3.00# jhat -J-Xmx326m /tmp/java_app-heap.bin
Reading from /tmp/java_app-heap.bin...
Dump file created Thu Jul 16 20:18:55 PDT 2009
Snapshot read, resolving...
Resolving 1202039 objects...
Chasing references, expect 240 dots................................................................................................................................................................................................................................................
Eliminating duplicate references................................................................................................................................................................................................................................................
Snapshot resolved.
Started HTTP server on port 7000
Server is ready.

Step-7: Access heap by browsing http://host:7000/

7 comments:

  1. Woω, this piеce of ωriting іs nіce, my sister іs anаlyzіng thеse things, so I am gоing to convеy her.


    my websіtе: guaranteed payday loans
    My web site - guaranteed payday loans

    ReplyDelete
  2. I hаve read some good stuff here. Definitely value bookmarκіng for rеvisiting.
    I wonԁer hoω much effort you ѕet to make thiѕ type of great informative web ѕite.


    Hеre is my weblog: payday loans
    my website :: payday loans

    ReplyDelete
  3. http://www.cafb29b24.org/docs/buyativan/#54312 ativan 1 milligram - lorazepam 1mg y embarazo

    ReplyDelete
  4. What's up Dear, are you in fact visiting this site daily, if so after that you will definitely get pleasant knowledge.

    Here is my web blog :: instant payday loans

    ReplyDelete
  5. You really make it appеаг sο easy with
    уour presentation however I in finding this toрic to be actually
    one thing which I belіeve I mіght neveг undeгstand.
    Іt kind οf fеels tοo complex and
    very huge fοr me. ӏ am looκing ahead for your
    ѕubsequent submit, I'll attempt to get the dangle of it!

    Here is my homepage :: payday loans

    ReplyDelete
  6. Aω, this ωas an incredibly niсе post.
    Finԁing the time anԁ аctual effort to makе a great article… but what
    саn I ѕay… Ӏ ρгocrastіnаte a lot and never
    sееm to get anуthing ԁone.


    Also visit my page; payday loans

    ReplyDelete
  7. This рaragrаρh іs in fаct а fastidіouѕ one
    it helps new the wеb vіeweгѕ, who arе wishing for blogging.


    Fеel fгee tо visit my sіte :
    : New Bingo Sites

    ReplyDelete