com.sun.faban.harness.tools
Class CommandLineTool

java.lang.Object
  extended by com.sun.faban.harness.tools.CommandLineTool
Direct Known Subclasses:
Collector, Cpustat, Jvmstat

public class CommandLineTool
extends Object

This class handles the command line tools. Like, vmstat, mpstat, etc.

Author:
Sheetal Patil

Field Summary
 ToolContext ctx
          The injected tool context.
protected  long stopTime
           
 
Constructor Summary
CommandLineTool()
           
 
Method Summary
 void config()
          Configures the command line tool.
 void postprocess()
          This method is responsible for post-processing.
 void start()
          This method is responsible for starting the command line tool.
 void stop()
          This method is responsible for stopping the command line tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

public ToolContext ctx
The injected tool context.


stopTime

protected long stopTime
Constructor Detail

CommandLineTool

public CommandLineTool()
Method Detail

config

public void config()
Configures the command line tool. Tasks done in this method includes building the toolCmd using the params from the tool context.


start

public void start()
           throws IOException,
                  InterruptedException
This method is responsible for starting the command line tool.

Throws:
IOException - Error starting the command
InterruptedException - Interrupted waiting for commands

stop

public void stop()
          throws IOException,
                 InterruptedException
This method is responsible for stopping the command line tool.

Throws:
IOException - Error stopping the command
InterruptedException - Interrupted waiting for commands

postprocess

public void postprocess()
                 throws IOException,
                        InterruptedException
This method is responsible for post-processing. Command line tool post-processing scripts will turn the output file into a xan format.

Throws:
IOException - Error post-processing cpustat
InterruptedException - Interrupted waiting for commands