The three places you may wish to run your analyzer are in Eclipse, in the IBM® Support Assistant (ISA) and on the command line. You can either run your analyzer in isolation or as part of a script (see How to link your analyzers together using the scripting language for details about running as part of a script).
How to run your analyzer in Eclipse
The easiest way to run the Dump Analyzer within Eclipse is to run the
DumpAnalyzer.main()
method and pass in the fully qualified dump
name you wish to analyze. To do this:
How to run your analyzer from the command line
To run your analyzers from the command line it is advisable that you first package them into a jar file called analyzers.jar. You can either do this using the jar command or by the following steps in Eclipse:
To run from the command line the 4 jar files
need to be added to the bootstrap classpath and the
needs to be added to the classpath. In all of the file paths above, toolsDir denotes the directory where ISAv4 installs the tools (on Microsoft Windows, this is by default C:\Documents and Settings\Administrator\IBM\ISAv4\applications\eclipse).
For this example the 6 jar files have been copied from the above location to the directory which contains your analyzers.jar package. The command to run your analyzers is
java -cp (list of analyzer jar files) -Xbootclasspath/p:(list of DTFJ jar files) com.ibm.dtfj.analyzer.base.DumpAnalyzer (name of dump) (analyzer to run) |
For example, on a Windows command line the command to run the IRpoert analyzer example written in the Writing an analyzer that implements IReport is
java -cp dumpAnalyzer.jar;coreAnalyzers.jar;analyzers.jar -Xbootclasspath/p:j9/dtfj.jar;j9/dtfj-interface.jar;sov/dtfjsu.jar;sov/dtfj.jar com.ibm.dtfj.analyzer.base.DumpAnalyzer 20070307.dmp.zip mypackage.DWReport |
which gives the output
DumpAnalyzer V:1.0.2.20070906163649 starting analysis of 20070307.dmp.zip 14-Sep-2007 09:35:57 com.ibm.dtfj.analyzer.base.ImageContext initializeImageFactory WARNING: Image factory generation failed com.ibm.dtfj.image.sov.ImageFactory ================================ Error Summary ================================= No errors =============================== Analysis results =============================== DumpAnalyzer V:1.0.2.20070906163649 : Start analysis of F:\20070307.dmp.zip Image created on Windows XP |
How to run your analyzer in ISA
To run your own analyzers through ISA you need to package them into a jar file stored on your local file system. To create the jar file follow the instructions at the beginning of the How to run your analyzer from the command line section. Once the jar is created it can be added to Dump analyzer using the 'add analyzers' option on the launch screen menu. See also the Loading a new analysis module section.