Getting started with Agent Controller - OS/400

This guide contains the following information:

Prerequisites

Configuring and starting Agent Controller

Notation

<ifs restore directory> = The absolute directory path where the IFS portion of Agent Controller has been restored.

  1. In the HYADESDC library, create an empty save file called HYADESDC.SAVF by typing: CRTSAVF HYADESDC/HYADESDC
  2. Under iSeries QShell, create the IFS directory /opt/hyadesdc if it does not exist. If this directory exists, delete everything under it by typing rm -rf /opt/hyadesdc/*
  3. Transfer the downloaded HYADESDC.SAVF to the iSeries library HYADESDC, overwriting the save file created above.
  4. Restore the save file HYADESDC.SAVF located to the library HYADESDC, by typing:
    RSTOBJ OBJ(*ALL) SAVLIB(HYADESDC) DEV(*SAVF) SAVF(HYADESDC/HYADESDC)
  5. Restore the save file HYADESIFS.SAVF in HYADESDC to the IFS directory /opt/hyadesdc. For example,
    RST DEV('/QSYS.LIB/HYADESDC.LIB/HYADESIFS.FILE') OBJ('/opt/hyadesdc/*')

  6. Run SetConfig.sh script from a QShell (launched via STRQSH) in the <ifs restore directory>/bin directory to generate the configuration file for the Agent Controller. This step will require that a Java Virtual Machine (JVM) be present in the PATH environment variable.  Follow the prompts and enter the required parameters as appropriate.  The configuration file <ifs restore directory>/config/serviceconfig.xml will be generated based on your inputs.
  7. Add the HYADESDC library to the library list entry by running: ADDLIBLE HYADESDC
  8. Start the Agent Controller by running: SBMJOB CMD(CALL RASERVER) JOBD(RASTART)
  9. Alternatively, the Agent Controller can be started from QShell by running the RAStart.sh script under the /opt/hyadesdc/bin directory
  10. Stop the Agent Controller by running: ENDJOB JOB(RASTART) OPTION(*IMMED)
  11. Alternatively, the Agent Controller can be stopped from QShell by running the RAStop.sh script under the /opt/hyadesdc/bin directory

You can verify the version of the installed Agent Controller by running the QShell script version.sh under the /opt/hyadesdc/bin directory. This requires step 7 to be executed before entering QShell.

If you want to make changes to the configuration file that was generated in step 5, you may run the SetConfig.sh script again or you may manually edit the file according to the rules outlined in the document Agent Controller configuration files.  The Agent Controller must be restarted for the changes to take effect.

Agent Controller Logging

All Agent Controller log entries will be placed in <ifs restore directory>/config/servicelog.log .

Invoking the Java Profiler

The Java Profiler consists of a Profiling Agent packaged as a library.  This profiling agent is started by the JVM when the JVM is started with the -Xrun option described below.  The profiling agent interacts with the JVM to capture and record the Java application's behavior. The output from the profiling agent is in the form of XML fragments.  The format of this fragment is described in the document entitled "Event Specification for the Java Profiler".

You can profile a Java application by using the Eclipse workbench or manually by invoking the profiler from the command line.

Invocation of the Java Profiler from the Hyades Workbench

The Java Profiler can be launched from the Eclipse workbench. From the Profiling and Logging Perspective of the Eclipse workbench you can launch applications using the Run > Profile menu or the toolbar button.  A wizard will come up. Simply follow the wizard to profile an application.  Applications in the current Eclipse workbench's workspace, or external Java applications located in the file system, can be launched and profiled.

Invocation of the Java Profiler from the Command Line

Note: Step 7 in Configuring and starting Agent Controller is required for invoking the Java Profiler from the command line. Also, multithread capability must be enabled to profile a java application from the command line. Under QShell, the environment variable QIBM_MULTI_THREADED must be set to Y by the command: export QIBM_MULTI_THREADED=Y. The Java Profiler is invoked from a command line using the -Xrun JVM option as follows:

    -XrunpiAgent[:agent_parm[,agent_parm]*
where agent_parm may be:

Uninstalling Agent Controller

To uninstall the Agent Controller:

  1. Stop the Agent Controller by running the following command:
    ENDJOB JOB(RASTART) OPTION(*IMMED)
  2. Remove the Agent Controller library HYADESDC and its contents.
  3. Remove the IFS directory /opt/hyadesdc (including all subdirectories and files) with the following command from a QShell:
    rm -r /opt/hyadesdc/*