Table of Contents
About this page
This page describes how the tools metrics scripts work and what configurations are needed in order to use them.
Requirements for using the scripts
See this page for some information about using these scripts.
What the scripts are for
The scripts (available in the repository under <repository_trunk>/tools/metrics/trans_between_containers/scripts) allow easy execution of the metrics. </repository_trunk>
Scripts Configuration
To successfuly run the metrics tests, you will need to configure the following parameters (variables) in the run_test.sh script.
- JAVA_USR: must be set to the (system) user you wish to run the JVM (for security reasons, this shouldn't be the root user, you can use the command whoami to determine your username and use it in this configuration).
- SRC_BUNDLE_PATH: is the path to the bundle defining the agent to migrate in the tests. If you have built the agent tool component, the bundle to configure in here is the one located under the component's path lib directory. Alternatively, you can download a already built version from the agent examples file directory (named *lightweight.agent*).
- SVC_BUNDLES_PATH: is the path to the directory containing the service bundles.
- JAR_PATH_JADE: is the path to the jar of JADE.
- JAR_PATH_FELIX:is the path to the jar of Felix OSGi framework.
- JAR_PATH_LAUNCHER: is the path to the jar (not bundle) defining the Launcher class (for metrics execution). If you have built the launcher tool component, the bundle to configure in here is the one located under the component's path lib directory.
- JAR_PATH_OSMOSES_MOBILITY_SVC: is the path to the jar (not bundle) defining the OsMoSes agent mobility service.
- JAR_PATH_IMTP_TRANSPORT_SVC: is the path to the jar (not bundle) defining the OsMoSes IMTP transport service.
- JAR_PATH_TRANSPORT_CONNECTION: is the path to the jar (not bundle) defining the OsMoSes transport connection definitions.
Running the tests
Once you have configured the scripts, you can execute the tests.
Note: Tests must be executed as root user.
To choose the tests case and execute it you have two alternatives:
- You can use the nice interactive test selection script (choose_test.sh) which will lead you through every available test case configuration option
- Or, you can use directly the test execution script (run_test.sh) whose behavior is configured (like most of the Unix commands) through its parameters.
Because the first option is (supposed to be) so human friendly and intuitive, only the second option will be described (next).
Using directly the test execution script
The test execution script (run_test.sh) supports the following parameters (order is not important):
- --osmoses: use [OsMoSes mobility service]](https://sourceforge.net/p/jade-osmoses/wiki/components/#jade-osgi-based-mobility-service). If this option is not specified, the JADE's built-in mobility service is used.
- --imtp_channel: Use OsMoSes IMTP transport service as communication channel. If this option is not specified, the TCP based communication channel will be used. Note that this option only is valid when using the --osmoses one.
- --present: Run the test case when the definition for the agent being migrated is already available on the destination container (no need to transmit it). If this option is not specified, the definition will only be available on the source container (previous migration).
- --agent_finishes: Use the version of the agent that finishes its execution. If this option is not specified, the version that stays alive is used.