Showing posts with label ffdctool. Show all posts
Showing posts with label ffdctool. Show all posts

Configuring FFDC Tool

The FFDC tool does not affect performance of the server and should not be disabled. But the FFDC tool does create one incident file for each of the incident and you can configure when these incident files should be purged.

There are three property files which control the behavior of the ffdc filter. The files which are used are based upon the state of the server:


  1. ffdcStart.properties: used during start of the server

  2. ffdcRun.properties: used after the server is ready

  3. ffdcStop.properties: used while the server is in the process of stopping



The only file that you should modify is the ffdcRun.properties file. You can change the value of ExceptionFileMaximumAge property. This property specifies the number of days that an FFDC log remains in the <profileroot>/logs/ffdc directory before being deleted. As part of your diagnostic data collection plan, you might want to modify the ExceptionFileMaximumAge property to ensure that the FFDC files remain on your system for a certain time period. You should not modify any other properties unless you are asked to do so by the support team.

Understanding FFDC log files

When your running your websphere application server you will see this type of messages in your SystemOut.log file or in the console of your RAD saying that FFDC incident stream file is opened.


[6/24/09 17:21:07:125 PDT] 0000000a ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened incident stream file C:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_0000000a_09.06.24_17.21.07_0.txt
[6/24/09 17:21:07:140 PDT] 0000000a ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file C:\IBM\WebSphere\wp_profile\logs\ffdc\WebSphere_Portal_0000000a_09.06.24_17.21.07_0.txt


This line indicates that some abnormal condition happened and a FFDC log has been created for that error. You can safely ignore this message. There are two artifacts which are produced by FFDC, the information can be located in the <profileroot>/logs/FFDC directory:


  • Exception Logs:<ServerName>_Exception.log
  • Incident Stream:<ServerName>_<threadid>_<timeStamp>_<SequenceNumber>.txt



The first file <ServerName>_Exception.log has one entry each for all the FFDC incidents that happened since the server started. So most of the data in this file is old. This is how a sample entry in <ServerName>_Exception.log file looks like


Index Count Time of last Occurrence Exception SourceId ProbeId
------+------+---------------------------+--------------------------
1 1 6/19/09 17:26:15:686 PDT java.util.zip.ZipException com.ibm.ws.classloader.ClassLoaderUtils.addDependents 238
------+------+---------------------------+--------------------------


The incident stream contains more details about exceptions which have been encountered during the running of the server. One indecent file would be created for every indecent with detailed thread dump of the thread in which exception occurred. This is how a sample incident file looks like

------Start of DE processing------ = [6/26/09 9:03:07:161 PDT] , key = java.util.zip.ZipException com.ibm.ws.classloader.ClassLoaderUtils.addDependents 238
Exception = java.util.zip.ZipException
Source = com.ibm.ws.classloader.ClassLoaderUtils.addDependents
probeid = 238
Stack Dump = java.util.zip.ZipException: Bad file descriptor C:\IBM\WebSphere\PortalServer\lwp04.infra\sync.infra\syncmlbase\shared\app\lotusworkplacelib\eclipse-runtime.jar
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:238)
at java.util.jar.JarFile.(JarFile.java:169)
at java.util.jar.JarFile.(JarFile.java:107)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependents(ClassLoaderUtils.java:99)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependents(ClassLoaderUtils.java:146)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependents(ClassLoaderUtils.java:146)
at com.ibm.ws.classloader.ClassLoaderUtils.addDependentJars(ClassLoaderUtils.java:60)
at com.ibm.ws.runtime.component.ApplicationServerImpl.initializeClassLoader(ApplicationServerImpl.java:278)
at com.ibm.ws.runtime.component.ApplicationServerImpl.initialize(ApplicationServerImpl.java:136)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponent(ContainerImpl.java:1338)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:1171)
at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:356)
at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:178)
at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:140)
at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:461)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:183)
at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:90)
at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:72)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:336)
at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:91)

Dump of callerThis =
null

Exception = java.util.zip.ZipException
Source = com.ibm.ws.classloader.ClassLoaderUtils.addDependents
probeid = 238
Dump of callerThis =
null

You can relate the incident file with the exception.log file by taking the probeid from the incident file and searching for it in the exception.log file. You will notice that timestamps also match.

Use First Failure Data Capture (FFDC) Tool

WebSphere Application Server includes a feature called First Failure data capture (FFDC). This tool runs in the background and collects events and errors that occur during WebSphere Application server runtime and logs that information into profiles\<servername>\logs\ffdc folder

The FFDC logs are mostly not going to be useful to the administrator but they are useful for the websphere application server support team when you open a PMR.