Express (Distributed operating systems), v8.0 > Troubleshoot and support > Analyzing application server Java system dumps with the IBM Monitoring and Diagnostic Tools for Java - Dump Analyzer > Write a new analysis module or script > Write and running a new analysis script


How to link your analyzers together using the scripting language

As mentioned in An overview of the scripting language you can link analyzers together using the simple scripting language shipped as part of the DumpAnalyzer. List 1 is an example of such a script which links the two analyzers described in Write an analyzer that implements IAnalyze and Write an analyzer that implements IReport.

To continue to follow along with this example create a file called script.sml in your AnalysisModule project in Eclipse and copy the contents of Listing 1 into this newly created file.

List 1. Example of a script linking two analyzers together

 // need to import the Analyzers to run
import mypackage.DWAnalyze
import mypackage.DWReport

// The state value is used to control the flow through the sml file // It needs to be set to start initially
state start 
// multi is set to the value returned from running the DWAnalyze class.
// It is the value that is returned from the analysisRules logic
// in this class
multi = DWAnalyze:isMultiProcessor
if (multi = true)
    // depending on the value of multi, print some output
    print DWAnalyze detected a multiprocessor dump
else
    print DWAnalyze did not detect find a multiprocessor dump
fi

// Next run the DWReport class
report DWReport  // run the report

// Finally exit
terminate ok



As you can see from the comments within Listing 1 this sample script runs the isMultiProcessor rule contained within the DWAnalyze class and prints out an appropriate message according to the result. It then runs the DWReport analyzer. disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

+

Search Tips   |   Advanced Search