d8888 888 888      88888888888 888      d8b                                 888       888          888       .d8888b.           888                               
      d88888 888 888          888     888      Y8P                                 888   o   888          888      d88P  Y88b          888                               
     d88P888 888 888          888     888                                          888  d8b  888          888      Y88b.               888                               
    d88P 888 888 888          888     88888b.  888 88888b.   .d88b.  .d8888b       888 d888b 888  .d88b.  88888b.   "Y888b.   88888b.  88888b.   .d88b.  888d888 .d88b.  
   d88P  888 888 888          888     888 "88b 888 888 "88b d88P"88b 88K           888d88888b888 d8P  Y8b 888 "88b     "Y88b. 888 "88b 888 "88b d8P  Y8b 888P"  d8P  Y8b 
  d88P   888 888 888          888     888  888 888 888  888 888  888 "Y8888b.      88888P Y88888 88888888 888  888       "888 888  888 888  888 88888888 888    88888888 
 d8888888888 888 888          888     888  888 888 888  888 Y88b 888      X88      8888P   Y8888 Y8b.     888 d88P Y88b  d88P 888 d88P 888  888 Y8b.     888    Y8b.     
d88P     888 888 888          888     888  888 888 888  888  "Y88888  88888P'      888P     Y888  "Y8888  88888P"   "Y8888P"  88888P"  888  888  "Y8888  888     "Y8888  
                                                                 888                                                          888                                        
                                                            Y8b d88P                                                          888                                        
                                                             "Y88P"                                                           888   

All Things WebSphere

Concerns and issues relating to all versions of WebSphere Application Server

Wednesday, December 28, 2011


IBM JVM and JDK -Xdump and -Xtrace options for scenario based problem determination

There are multiple ways of configuring the IBM JDK shipped by WebSphere Application Server to generate  WebSphere and JDK trace in situations where you have no control of the application or the server runtime.

Scenario 1: 
In a long running server when an exception occurs say a javax.transaction.RollbackException, we need to enable a particular WebSphere runtime trace for a period of 1 hour to collect pertinent logs. This allows for collection for logs ONLY and IF a critical incident occurs in long run and production deployment scenarios.

Using the JVM dump engine ability to run command lines based on events, you could trigger a command line on, say, the uncaught javax.transaction.RollbackException:
-Xdump:tool:events=uncaught.filter="javax/transaction/RollbackException",exec="command line to run"
Where we could then use wsadmin to change the trace settings:
exec="sh /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -lang jython -f setWASTrace.py"

For (setWASTrace.py) scripting with WebSphere Application Server see this blog post.

Scenario 2:
Print a thread stack trace whenever the method com.ibm.ws.util.ThreadPool$Worker.setStartTime method is called
-Xtrace:print=mt,methods={com/ibm/ws/util/ThreadPool$Worker.setStar tTime},trigger=method{com/ibm/ws/util/ThreadPool$Worker.setStartTime,jstack trace}

Scenario 3:
Print JVM entry and exit trace in clear text whenever any code is executed in the sun.net.www.protocol.http and sun.net.www.http packages

Scenario 4
Take Javacores when CPU Starvation is detected. This will write to a file named cpu_starvation%pid%.txt in the current working directory of the JVM (i.e. the same directory as the javacores) when CPUStarvationDetectedException is thrown
-Xdump:tool:events=throw,range=1..0,filter=com/ibm/loglistener/CPUStarvationDetectedException,exec="cmd /c c:\cpu_starvation.bat end %pid" 

Scenario 5
Take java stack traces when multiple methods are fired. This is useful to determine the root cause of memory leaks if one method allocates an object (i.e. puts in a map) and other method releases the resource (removes the object from the map)

-Xtrace:trigger=method{com/ibm/ws/webbeans/services/JCDIComponentImpl.storeCreationalContext,jstacktrace} -Xtrace:trigger=method{com/ibm/ws/webbeans/services/JCDIComponentImpl.releaseCreationalContext,jstacktrace} 


Dеfіnitelу belіeve that that уou stated.
Yοur favorite reason aρpeаred tο bе at
thе іntеrnet the simpleѕt factor tο гemеmbeг οf.
I say to you, I definitely get іrked at the samе time as otheг pеople think abоut worгіes that theу
plainlу don't understand about. You controlled to hit the nail upon the top and also defined out the whole thing without having side effect , other people can take a signal. Will probably be back to get more. Thanks

Stop by my homepage :: thoi trang Cong so
I'm not sure exactly why but this blog is loading incredibly slow for me. Is anyone else having this issue or is it a issue on my end? I'll сhеck back
latеr on anԁ see if the problem still еxіsts.

my web ѕite: thoi trang nu
My page - thoi trang nu
Wοw, ωonderful blog lаyout! How lоng haνе you been blоggіng fоr?
you mаԁе bloggіng lοok еasy.
Thе oνerall loοκ of your websіtе is fantastіc, аs
ωell as the content!

Feel free tο surf tο mу pagе http://www.sstown.net/space.php?uid=66&do=blog&id=230
Наving гeaԁ this I thought it was extгemely enlightening.

I appreciаtе уоu finԁing the tіmе and energy
to put thiѕ ѕhort аrtiсle togetheг.
I once agаin find mysеlf peгsоnally spеnԁіng ωay too much
timе both reading anԁ commenting. Вut so what,
it ωas stіll ωorthwhile!

my blog post; thoi trang nu

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home


December 2006   September 2008   January 2009   February 2009   March 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   October 2010   January 2011   February 2011   April 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   March 2012   April 2012   May 2012   June 2012   July 2012   August 2012   September 2012   October 2012   November 2012   January 2013   May 2013   June 2013   July 2013   September 2013   October 2013  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]