[Next] [Previous] [Top] [Contents] [Index]
RootCause
The following commands are available from the command line after RootCause has been installed(see Chapter 4, "Getting Started").
The rootcause command is designed to run in a simple, intuitive manner when default file names are used. When run with no arguments, it gives version and license information. When run with rootcause -h, it shows the following commands, which are described in detail in this chapter.
The rootcause build command updates a RootCause workspace without opening the GUI. This is useful for maintaining workspaces as part of a script-driven product development process. The location of a workspace is provided, along with paths to all relevant programs and modules whose locations or contents may have changed. Note that a side-effect of this process may be to lose traces that no longer apply to a changed module.
rootcause build [-Fh] [ -x program_file | file.class | file.jar ] [-m module]* [-w] workspace.aws
.class or .jar file containing your Java application's main entry. This is the same as the argument to Reset Program in the GUI.
Rebuild workspace Pi.aws against current modules in case they've changed:
rootcause build Pi.awsUpdate the RootCause self-analysis workspace for the current installation location:
rootcause build -x %APROBE%\lib\probeit.jar The rootcause collect command is executed on a remote computer where the RootCause Agent component has been installed to gather the RootCause data together into a single .clct file to be transmitted to a computer where the RootCause GUI component has been installed for subsequent decollection and analysis. It examines the rootcause registry to determine the workspace for the classes, if no workspace is specified. Multiple classes and workspaces may be specified for collection. If no arguments are supplied, the RootCause log and registry are collected.
rootcause collect [-AFh] [ -o clct_file ] [ -f other_file ] [ [-x] program_file | -c class | [-w] workspace.aws ]...
The following command collects the data for the Java class Pi and the workspace fred.aws and places those two RootCause traces into the single file myserver.clct.
rootcause collect -c Pi -w fred.aws -o myserver.clctThe rootcause config command reports current configuration information. With no arguments it shows the installation directory and license information.
rootcause config [ -dhlLnRuvV ]
Show the current installation information:
C:\> rootcause configThe rootcause decollect command unpackas a .clct file built by the rootcause collect command. This function is also performed by the Decollect operation in the RootCause GUI (see "Decollect Data Dialog").
The result of this operation is a directory tree whose root directory has suffix .dclct.
rootcause decollect [-F] [-o directory] clct_file
Decollect the data in myserver.clct into myserver.dclct
The rootcause deploy command packages a workspace for use in a remote (agent) environment. This function is also performed by the Deploy operation in the RootCause GUI (see "Deploy Dialog"). The result of this operation is a zip file with suffix .dply. Note that this command does not verify the workspace is already built. If you're not sure, do rootcause build first.
rootcause deploy [-Fh][ [-x] program_file | [-c class] [-w]workspace.aws ] [-l license_file] [-m module][-o dply_file]
%APROBE%\licenses\agent_license.dat.
Deploy workspace forclass Factor and module Factor.dll into Factor.dply.
rootcause deploy -c Factor -m \Programs\Factor.dll -o Factor.dply The rootcause format command runs apformat on the data collected in the specified workspace. This produces output similar to that produced by Save As Text in the RootCause GUI. By default rootcause format operates on the most current process. Because it formats all the data it can take a while for large amounts of data. You can use the -O option in conjunction with the apformat "-n" option to limit it to specific APD files, as shown in Example 3 below.
rootcause format [-hlr][-p PID][-O "options"][-t tmpdir] [-w] workspace.aws
Format the newest data set in Pi.aws into the file Pi.txt.
Pi.aws > Pi.txt
List the Process Data Set in workspace Pi.aws.
C:\> rootcause format -l Pi.aws
C:\Work\Pi.aws\Pi.class.apd.119\Pi.class.apdRun apformat directly on the newest data file for process 117 in Pi.aws.
rootcause format -r -O "-n 0" -p 117Pi.aws
The rootcause log command provides information about the RootCause Log, and allows its maximum size to be changed.
rootcause log [-hlnsFZ | -s size ]
Write the contents of the log to standard output:
rootcause logSet the size of the log to 20000 bytes:
rootcause log -s 20000
The rootcause merge command merges two workspaces to create a new, third workspace. It works by copying the first primary workspace to the third result workspace, then adding compatible traces and UALs from the second secondary workspace. A module must exist in both the primary and secondary workspaces in order that traces for that module appear in the result workspace.
There is no GUI operation equivalent to rootcause merge. You can use it in conjunction with the GUI by:
Using Workspace->Close to close your current workspace
Applying rootcause merge from the command line
Using Workspace->Open on the result workspace.
Note: The rootcause build and rootcause register operations must be applied to the result workspace before the result workspace can be used to trace an application.
rootcause merge [-Fh] primary.aws secondary.aws result.aws
Merge traces in PiDetails.aws into Pi.aws to produce PiPlus.aws and make PiPlus.aws the new workspace for tracing Pi.
rootcause merge PiDetails.aws Pi.aws PiPlus.awsThe rootcause new command creates a new workspace. Generally this is done through the RootCause GUI using the New menu item or Open Associated Workspace; (see "New Workspace Dialog"). The result of this operation is the named workspace, initialized to do default tracing. If the -r option is used, the workspace is also registered with the specified program or Java class.
rootcause new [-Fhr][-c class] -x program_file [-w]workspace.aws ]
.class or .jar file the workspace will be used to trace (as on the rootcause open command).
Use the rootcause off command to disable rootcause interception of processes on your machine.
rootcause off
Use the rootcause on command to start the inspection and interception of processes on your machine to determine if they should be traced with rootcause.
rootcause on [ verbose | quiet ]
If verbose is specified , every process is recorded in the rootcause log. If quiet is specified, only applications trace with rootcause are recorded in the log. If no qualifier is given, the logging level is not changed. The initial value after installation is verbose, so that "rootcause on" will result in all processes being logged.
The rootcause open command starts the RootCause GUI. If the application class specified on the command line is registered, the GUI will automatically set the workspace from the registry entry for the application. If the application is not registered, the GUI will prompt for a new workspace name and register the application. If no arguments are specified, the current RootCause Log file is opened.
rootcause open [[-x] program_file] [-c classname] [[-w] workspace.aws] [ [-d] dir.dclct | [-z] file.clct ]
.class or .jar file containing your Java application's main entry
rootcause collect command
Start the RootCause GUI and examine the RootCause Log file in a Trace Display window.
rootcause openStart the RootCause GUI to open new or existing workspace converter.aws.
rootcause open converter.awsStart the RootCause GUI to open a new or existing workspace for main class Pi compiled into file Pi.class.
rootcause open Pi.classStart the RootCause GUI to open a new or existing workspace for main class com.ocsystems.probeit.Main compiled into file probeit.jar.
rootcause open probeit.jar -c com.ocsystems.probeit.MainStart the RootCause GUI to unpack (decollect) the collected rootcause data in pi_demo.clct.
rootcause open pi_demo.clct The rootcause register command provides the interface to the RootCause registry. The GUI will allow you to add or delete the current workspace from the registry, but you must use the register command to otherwise manipulate the registry. It is likely that, over time, more GUI support will be added to manipulate the registry, but on computers where only the RootCause Agent is installed, there is no GUI and the register command must be used.
rootcause register [subcommand ] options [deploy_file]
The subcommand flag designates the operation to be performed:
debugon/off (off by default)
verboseon/off (on by default)on | off .dply file to unpack into a registered workspace
List the registry name and contents:
rootcause register -lThe following command will do the following all in one step:
register the program
create the workspace (if it does not exist)
deploy the trace into the workspace
This would be the typical command used on a remote computer where only the RootCause Agent component was installed in order to implement a .dply file generated by the RootCause GUI component. After this command is issued, you would merely execute rootcause on and run the application.
rootcause register jfrob.dply Use rootcause run before your command to cause it to be run with rootcause on, independent of the current rootcause status. The command specified will be run in the current window exactly as if it were not preceded by rootcause run. This is equivalent to
on off
rootcause run command
Identical to rootcause run, but the command is run in a separate window. This is used by the Run button in the RootCause GUI.
rootcause xrun command
Use the rootcause status command to show whether rootcause tracing is currently enabled or disabled.
rootcause status