|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMessageLogger
com.ibm.dtfj.analyzer.base.DumpAnalyzer
public class DumpAnalyzer
The primary class defining the DumpAnalyzer. This provides a mainline for command line invocation as well as an interface for ISA to invoke.
Constructor Summary | |
---|---|
DumpAnalyzer(java.lang.String fname,
RuntimeParameters parms)
Build an analyzer to examine the named dump. |
|
DumpAnalyzer(java.lang.String fname,
java.lang.String[] analyzers)
Build an analyzer to examine the named dump. |
|
DumpAnalyzer(java.lang.String fname,
java.lang.String[] analyzers,
RuntimeParameters parms)
Build an analyzer to examine the named dump. |
Method Summary | |
---|---|
boolean |
analysisRequired()
|
static java.lang.String |
analyze(java.lang.String fname,
java.lang.String opts,
java.lang.String scriptDir)
Provide an interface to ISA in order to analyse the dump given on the constructor. |
void |
analyzeFile()
Analyze the file for which this analyzer was built |
static long |
estimateAnalysisMillisecs(java.lang.String fname)
Provide an interface to ISA in order to guess the time that the analysis of a dump will take. |
java.lang.String |
generateHTMLErrors()
Get a string with the errors in html form (separated by tags) |
java.lang.ClassLoader |
getClassLoader()
Get the ClassLoader used for finding analyzers. |
java.util.logging.Logger |
getLogger()
|
static void |
main(java.lang.String[] args)
This mainline can be used to drive analysis of a specific dump using a specific set of analyzers or scripts. |
void |
notifyAnalysisComplete(IAnalyzerBase analyzer,
IAnalyzerContext context,
java.lang.String type)
(non-Javadoc) |
void |
notifyAnalysisPhase(IAnalyzerBase analyzer,
IAnalyzerContext context,
int phase,
int target)
(non-Javadoc) |
boolean |
notifyAnalysisProgress(IAnalyzerBase analyzer,
IAnalyzerContext context,
int progress,
int target)
(non-Javadoc) |
void |
notifyAnalysisStarting(IAnalyzerBase analyzer,
IAnalyzerContext context,
java.lang.String type)
(non-Javadoc) |
void |
notifyInitialization(java.lang.String name,
int progress,
int target)
(non-Javadoc) |
void |
printErrors()
Print the current set of analysis errors on System.out |
IAnalysisReport |
produceObservationReport()
Get a report containing all the analysis errors |
java.lang.String |
produceReport()
To make the output more usable we summarise the errors at the top of the output and hence this report contains that information |
void |
produceReport(java.io.OutputStream out)
To make the output more usable we summarise the errors at the top of the output and hence this report contains that information |
void |
run()
Run the analysis on the named file or directory. |
void |
setClassLoader(java.lang.ClassLoader loader)
Set a ClassLoader to use for finding analyzers |
void |
setLogFileName(java.lang.String logFileName)
Define the file for logging |
void |
setScriptDir(java.lang.String dir)
Define the directory which will contain analysis scripts |
static void |
setTerminateVMOnSevereError(boolean terminateVM)
By default the VM terminates with return code -10 if there are severe errors and the DumpAnalyzer is run through the main method. |
static int |
validateFile(java.lang.String fname)
Provide an interface to ISA to validate the dump name entered by the user |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DumpAnalyzer(java.lang.String fname, RuntimeParameters parms)
fname
- the dump nameparms
- the runtime parameters to control the analysispublic DumpAnalyzer(java.lang.String fname, java.lang.String[] analyzers)
fname
- the dump nameanalyzers
- the analyzers to run against that dumppublic DumpAnalyzer(java.lang.String fname, java.lang.String[] analyzers, RuntimeParameters parms)
fname
- the dump nameanalyzers
- the analyzers to run against that dumpparms
- the runtime parameters to control the analysisMethod Detail |
---|
public void setScriptDir(java.lang.String dir)
dir
- the script directorypublic java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader loader)
loader
- the loader to setpublic boolean analysisRequired()
public void run()
public void analyzeFile()
public void printErrors()
public java.lang.String generateHTMLErrors()
public IAnalysisReport produceObservationReport()
public void setLogFileName(java.lang.String logFileName)
logFileName
- name of the log filepublic java.lang.String produceReport()
public void produceReport(java.io.OutputStream out)
out
- OutputStream
to send an error and analysis result report topublic static int validateFile(java.lang.String fname)
fname
- - the name of the file to validate
public static long estimateAnalysisMillisecs(java.lang.String fname)
fname
- - the name of the file to estimate
public static java.lang.String analyze(java.lang.String fname, java.lang.String opts, java.lang.String scriptDir)
fname
- - file to analyzeopts
- - analysis optionsscriptDir
- - the script directory
public static void main(java.lang.String[] args)
args
- - first arg is the dump name or directory containing dumps
- remaining args are the list of analyzers to run against the dumppublic static void setTerminateVMOnSevereError(boolean terminateVM)
terminateVM
- - set to be false if do not want the vm to terminate if there
are severe errors and true otherwise (default is true)public void notifyInitialization(java.lang.String name, int progress, int target)
notifyInitialization
in interface IProgress
name
- the file being processedprogress
- the progress made so fartarget
- the targetIProgress.notifyInitialization(java.lang.String, int, int)
public void notifyAnalysisStarting(IAnalyzerBase analyzer, IAnalyzerContext context, java.lang.String type)
notifyAnalysisStarting
in interface IProgress
analyzer
- the current analyzer which may be null during parsing of the input filecontext
- the current analysis context which may be null during parsing of the input filetype
- the analysis typeIProgress.notifyAnalysisStarting(com.ibm.dtfj.analyzer.ext.IAnalyzerBase, com.ibm.dtfj.analyzer.ext.IAnalyzerContext, java.lang.String)
public void notifyAnalysisComplete(IAnalyzerBase analyzer, IAnalyzerContext context, java.lang.String type)
notifyAnalysisComplete
in interface IProgress
analyzer
- the current analyzer which may be null during parsing of the input filecontext
- the current analysis context which may be null during parsing of the input filetype
- the analysis typeIProgress.notifyAnalysisComplete(com.ibm.dtfj.analyzer.ext.IAnalyzerBase, com.ibm.dtfj.analyzer.ext.IAnalyzerContext, java.lang.String)
public void notifyAnalysisPhase(IAnalyzerBase analyzer, IAnalyzerContext context, int phase, int target)
notifyAnalysisPhase
in interface IProgress
analyzer
- the current analyzer which may be null during parsing of the input filecontext
- the current analysis context which may be null during parsing of the input filephase
- the current analysis phase - this will be analyzer dependenttarget
- the target value or 0 if the target phase is not knownIProgress.notifyAnalysisPhase(com.ibm.dtfj.analyzer.ext.IAnalyzerBase, com.ibm.dtfj.analyzer.ext.IAnalyzerContext, int, int)
public boolean notifyAnalysisProgress(IAnalyzerBase analyzer, IAnalyzerContext context, int progress, int target)
notifyAnalysisProgress
in interface IProgress
analyzer
- the current analyzer which may be null during parsing of the input filecontext
- the current analysis context which may be null during parsing of the input fileprogress
- the progress made so fartarget
- the target value or 0 if the target is not known
IProgress.notifyAnalysisProgress(com.ibm.dtfj.analyzer.ext.IAnalyzerBase, com.ibm.dtfj.analyzer.ext.IAnalyzerContext, int, int)
public java.util.logging.Logger getLogger()
com.ibm.dtfj.analyzer.internal.MessageLogger#getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |