RCUG 4 Getting Started
RootCause User Guide
Contents
Getting Started
rcc-7
-->
The Setup Script
Installation of RootCause from CD-ROM or compressed file is covered in Chapter 2, "Installing RootCause".
setup script in your shell every time you log in or otherwise reinitialize your environment. Therefore it is a good idea to put the appropriate command above in your ~/.profile
(for Korn or Bourne shells) or ~/.login file
(for C shell). See
[["rcc-12.html#MARKER-9-2009">"RootCause and Different Shells" for information about other shells.
This script defines the APROBE
environment variable and appends
$APROBE/bin
to your
PATH environment variable. It also sets defaults for both
APROBE_REGISTRY and
APROBE_LOG environment variables. If the registry does not exist, the setup script will create a default one.
The setup script also defines aliases that are not inherited by subsequent non-login shells you may open, such as with the xterm
command. To ensure that these aliases are defined (specifically rootcause_on
and rootcause_off
), you may add the command:
. $APROBE/setup.kshrc
into your ~/.kshrc
file if you are using Korn shell, or the command
source $APROBE/setup.cshrc
into your ~/.cshrc
file if you are using C shell.
Now you're ready to run RootCause.
The RootCause Process
Using RootCause is typically an iterative process with the following pattern:
Run your application in the normal way, but with RootCause enabled in its environment, for example:
rootcause_on
my_app_driver arg1 arg2
rootcause_offThis will record information about the application in the [["rcc-10.html#MARKER-9-963">RootCause Log file.
NOTE: On AIX, you must use "apaudit my_app_driver" in the above command instead of just "my_app_driver" to allow RootCause to log and trace your application. See [["#MARKER-9-532">Enabling RootCause for an AIX Application below.
Start the RootCause Console GUI with the
[["rcc-12.html#MARKER-9-2101">rootcause open
command. This will open the
[["rcc-11.html#MARKER-9-1321">Workspace Browserand the
[["rcc-11.html#MARKER-9-1725">Trace Displayshowing the contents of the
RootCause log file.Use
[["rcc-11.html#MARKER-9-1730">Open Associated WorkspaceClick [["rcc-11.html#MARKER-9-1426">Setup
and define the probes for the application by choosing what you want to trace in the
[["rcc-11.html#MARKER-9-1531">Trace Setup Dialog. Note that RootCause writes the probes to separate files, so the application itself remains totally unmodified.Execute the application as you normally would, but with rootcause "on", as in step 1 above. The application need not be executed from the RootCause GUI, although there is a convenience [["rcc-11.html#MARKER-9-1428">Run
Click the [["rcc-11.html#MARKER-9-1431">Index
button to bring up the index of data that was logged for the newest process in the workspace, and double-click on an item there to format the trace data collected by the probes, or you can use the
[["rcc-11.html#MARKER-9-1432">ExamineIn the [["rcc-11.html#MARKER-9-1725">Trace Display window that appears is a call tree. Here you can:
Use the [["rcc-11.html#MARKER-9-1795">Find
Select a node in the event tree and right-click to bring up the [["rcc-11.html#MARKER-9-1826">Trace Display Popup Menu
,
from which you can disable traces and perform other operations.Select a
SYN_
CALL_COUNTS node and use
[["rcc-11.html#MARKER-9-1761">Show Associated Tableto view and navigate to the function
s in the data file(s).Select a
LOAD_SHED
node and use
[["rcc-11.html#MARKER-9-1761">Show Associated Tableto view the table of all function
sfor which tracing was disabled due to
[["rcc-6.html#MARKER-9-433">load shedding during the run, and disable the tracing of these during subsequent runs.Save the output as
Text
orXML
for off-line processing
When you have completed analyzing the data and modifying the trace to tune the information collected, go back to step 4 to trace parameters or add probe actions, or return to step 2 to choose another program to trace.
If you wish to run the probes on a remote computer, then there are additional steps to send a RootCause workspace to the remote computer before execution. These are discussed in detail in
[][["rcc-9.html#MARKER-9-873">Chapter 6, "Deploying the RootCause Workspace".
This process is explored using a concrete example in the next chapter,
[][["rcc-8.html#MARKER-9-707">"RootCause Demo".
Enabling RootCause for an AIX Application
AIX provides no mechanism to cause a shared library to be automatically loaded into every application started. Therefore, the user must explicitly identify applications that are to be "intercepted" and recorded in the RootCause log, and subsequently traced using the process described in this document.
To run an executable under RootCause from the command line:
$ rootcause run my_program -opt arg2
or
$ rootcause on $ apaudit my_program -opt arg2 $ rootcause off
If it is not possible to directly invoke the application's executable from the command-line, you can simply rename the
[["rcc-6.html#MARKER-9-425">executable
to have a .exe
suffix, and replace it with a (soft-link to a) script which will invoke the real application. For example:
$ mv my_program my_program.exe $ ln -s $APROBE/bin/run_with_apaudit my_program
The
run_with_apaudit
script simply re-invokes the program with apaudit as in the second example above.
When we use the phrase
"[["rcc-6.html#MARKER-9-458">run with rootcause on"
we refer to any of the above mechanisms.
To enable automatic RootCause actions for Java applications (i.e., those normally run with the "java" command), you must do this for the native java executable
. This is generally not necessary, since you can more easily change "java" to "apaudit java" at the point of invocation. However, if you want to enable RootCause in your central Java installation, you should contact OC Systems for assistance: different Java versions are configured differently.
Copyright 2006-2017 OC Systems, Inc.