Manual: Distributed Environment Emulator

[English | Japanese]
last-updated: September 20, 2009


owemu - Distributed Environment Emulator


owemu [-h] [--eventdriven] [-f <host list file>] [-w <str rep of host list>] [-s <self hostname>] [<scenario URL|file>]


Distributed Environment Emulator is a tool which invokes and hosts multiple instances of Java applications in it on a single computer. It reads an emulation scenario and invokes and controls applications according to the scenario. All applications are assigned its own thread and run concurrently. Applications using Messaging Service of the toolkit can communicate each other as they run on a real network. Note that the Emulator is not dedicated to the toolkit and is able to host usual Java applications.

There are two modes in which the Emulator works. In the normal mode, the whole Emulator runs on a single computer. In the other mode, multiple computers form a single Emulator in cooperation. It is referred as Distributed Emulator. A user starts a master Emulator and it invokes workers on remote computers via SSH. The Emulator reads the same scenario file in both cases.


The Emulator reads a scenario from the specified URLs and files. If multiple arguments are specified, all texts are concatenated and parsed as a single scenario file. If no argument is given, the Emulator reads a scenario from standard input.

Print help messages.
Emulator works in event-driven mode, not real time mode (default). It executes scheduled commands successively without waiting for the intervals between commands. But it executes commands serially, not in parallel utilizing SMPs.
-f <host list file>
If this option is given, the Emulator works in Distributed Emulator mode. It uses the specified file as the host list file. A host list file contains lines as follows:
hostname0 0
hostname1 1
hostname2 101
In this case, only the first virtual computer (named emu0) is assigned to a computer hostname0. 100 virtual computers (named emu1 ... emu100) are assigned to a computer hostname1 and all remaining virtual computers (emu101 ...) run on a computer hostname2. All virtual computer hosts an application instance.
-w <string representation of host list>
Not for a user and specified to a worker by a master Emulator.
-s <self hostname>
Not for a user and specified to a worker by a master Emulator.


Emulator accepts the following commands in a scenario. Command can be shortened (e.g. arg) and complemented.

class <class name>
Later invoke commands instantiate the specified class and invoke its main method.
arguments [<argument> ...]
Later invoke commands give the specified arguments to the main method when invocation.
invoke [<ID of app instance>]
Instantiates earlier specified class by a class command and invoke its main method. If the class implements EmulatorControllable interface, this command invokes start method of the interface instead of main method.
priority <relative priority>
Later invoke commands create threads with the specified priority. The specified number is treated as relative priority to the Emulator itself.
control <ID of app instance> <command into stdin> [...]
Writes the specified strings into an application instance via EmulatorControllable interface. ID of application instance starts from 0 in invocation order. For example, the first instance runs on emu0 has the ID 0. A special ID "all" means all application instances.
controlserially <ID of app instance> <command into stdin> [...]
Same as "control" command. But multiple "controlserially" commands control an application instance serially in the order which the commands are written in a scenario. Note that both "control" and "controlserially" commands run serially today. In other words, a "control..." command finishes and the next command runs.
A special form of control command. Writes the string "halt" into all applicatio instance via EmulatorControllable interface.
timeoffset [+]<offset>
Following schedule commands add the offset specified here to its schedule.
schedule [+]<time>[,<interval>[,<times>]] <another command> [...]
Schedules the another command specified as the 2nd arg (e.g. invoke and control) at the specified time (in millisecond). If an interval is specified, the command is scheduled repeatedly with the specified interval. If a times is specified, scheduled specified times, otherwise repeated endlessly.
include <file name> Parses contents of the specified file as the list of commands.
Print help messages.
Terminates the Emulator.
remote connect
For Distributed Emulator. Invokes workers on remote computers.
remote directory [<path on which remote JVM runs>]
For Distributed Emulator. When a worker is invoked, remote shell changes to the specified path.
remote javapath [<path of java command on a remote computer>]
For Distributed Emulator. When a worker is invoked, remote shell searches java command on the specified path.
remote jvmoption [<options supplied to java command>]
For Distributed Emulator. When a worker is invoked, the specified option is given to the java command.

Return to Documents page
Return to Overlay Viewer main page