Character-based User Interface (CUI) of Controller

last-updated: June 10, 2004
This page is an user's manual of character-based user interface (CUI) of Controller.

Table of Contents

List of all commands

The CUI provides the following commands.

Invoke a CUI

CUI of Controller requires a backend server running and communicates with it through JMX Remote API. First invoke the server. The <somewhere> is the directory where you install P3 into.

On UNIX-like OS:
<somewhere>/megacomp/bin/mc-controller-server.sh
On Windows (This batch file is not available now):
<somewhere>\megacomp\bin\mc-controller-server.bat
A directory named .rjmx is created in the current directory. You have to invoke a CUI on the same directory because the CUI needs the .rjmx direcotry in the current directory.

On another (UNIX) shell, in the same directory on which you invoked the server, now you can invoke a CUI. Of course, you can run the server as a background process and invoke a CUI as a foreground process on a single shell.

On UNIX-like OS:
<somewhere>/megacomp/bin/mc-controller-shell.sh
On Windows (This bach file is not available now):
<somewhere>\megacomp\bin\mc-controller-shell.bat

Now you see the prompt.

Shell>
Type Ctrl + D to exit from the CUI.

Create a Job Group

Use the "create" command to create a Job Group. You can use optional single and double quotes (' and ") to quote a job name with space characters or quotes.
Shell> create "test 1"
Shell> create 'test "'
Use the "list-jobs" command to see the list of all Job Groups created.
Shell> list-jobs
   0: test " <urn:jxta:uuid-84E782DC5F9C44C4B8E6DD8A2FF65E2402>
   1: test 1 <urn:jxta:uuid-C88F9CE412D2484C9B14D88F4A3CAFAD02>
The "list-jobs" command itself caches the list of Job Groups and a query as "list-jobs -n" shows the cached list without any query to JXTA.

Join a Job Group

Use "select" command to focus on a Job Group and use "join" command to join it.
Shell> select-job 1
Shell> list-jobs
   0: test " 
*  1: test 1 
Shell> join
Shell> list-jobs
   0: test " 
*J 1: test 1 
On the Job Group list, the focussed Job Group has a prefix '*' and a prefix 'J' is attached to the Job Group which this Controller participates in.

Submit files

Use "submit" command to submit files into a Job Group. Currently, paths to files have to be absolute paths.

Shell> submit /home/shudo/megacomp/dist/app/rc5attack.jar
Use "list-files" command to see the list of submitted files.
Shell> list-files
  0: rc5attack.jar
The "list-files" command itself caches the list of files and a query as "list-files -n" shows the cached list withought any query to CMS, a service implemented on JXTA.

Inspect submitted files

Use "select-file" command to focus on a submitted file and use "info-file" to inspect it.

Shell> select-file 0
Shell> info-file
Property-File: rc5sample.properties
Application-Type: MasterWorker
Master-Class: megacomp.sample.rc5.master.RC5AttackMaster
Created-By: 1.4.2_07-b05 (Sun Microsystems Inc.)
Developer-Name: xxxxx
Ant-Version: Apache Ant 1.6.2
Manifest-Version: 1.0
Length: 30061
Application-Version: 0.0
Entry-Class: megacomp.api.masterworker.MasterWorkerAppSupportLibrary
Last-Modified: Fri Jun 10 17:32:00 JST 2005
Worker-Class: megacomp.sample.rc5.worker.RC5AttackWorker
Application-Name: MWTest

List participating Hosts (peers)

Use "list-peers" command to list Hosts (peers) participating in the Job Group which this Controller also participates in.

Shell> list-peers
 R 0: peer04
 R 1: peer03
 R 2: peer01
 R 3: peer02

The peer with a prefix 'R' is ready for executing the job. The prefix 'O' means the Host is not ready because it is online but trying to obtain required files. A Host without any perfix is offline and then does not execute the job.

Inspect a Host

Use "select-peer" command to focus on a Host and use "info-peer" command to inspect it.
Shell> select-peer 1
Shell> list-peers
 R 0: ptp04
*R 1: ptp03
 R 2: ptp01
 R 3: ptp02
Shell> info-peer
os.name: Linux
java.vm.version: 1.4.2_07-b05
os.arch: i386
megacomp.type: host
os.version: 2.6.11-1.1369_FC4
megacomp.master: off

Start a job

Use "select-file" command to focus a file submitted into the Job Group and invoke it with "start" command.
Shell> list-files
* 0: rc5attack.jar
Shell> select-file 0
Shell> start

Stop a job

Use "stop" command to stop a job.
Shell> list-jobs
   0: test " 
*R 1: test 1 
Shell> stop
Shell> list-jobs
   0: test " 
*J 1: test 1 
A prefix 'R' is attached to running jobs.
Return to Documents page
Return to P3 main page