Here are the key console commands. Unlike application commands console
commands do not have return values:
- connect <app_label> <app_warrant_file>
- Connect to an already-running
application. The console gives it the chosen label. If we do not give
a warrant file name, then we should instead use a variable which holds
a warrant. The warrant is then stored in a variable with the same
name as the chosen application label.
- disconnect <app_label>
- Disconnect the console from the application.
Does not stop the application.
- help
- Get a full list of console commands.
- host <warrant_file>
- Provide the warrant for a hosting service.
When we launch a new application it will launch onto this service.
If we do not give an XML warrant file name, then we should instead
use a variable which holds a warrant. Puts the current hosting warrant
into the standard variable $hosting.
- run <app_label> <launch_descriptor_file> [<arg>=<value>]*
- Launch
an application onto a remote node. The console will give it the chosen
label for future reference. The launch descriptor file describes the
netlet to be launched. Optional arguments may also be specified, and
passed to the netlet. These optional arguments are application-specific.
After launching, the console automatically issues a connect command.
Returns a warrant for the application which can be used to connect
to it again in future, and this warrant is put into the variable with
the same name as the chosen label.
- sas <warrant_file>
- Provide the warrant for a SAS. When we launch
a new application it will have its JARs uploaded into this service.
The warrant will also be given to the application on initialisation.
If no SAS is specified before launching a new application then that
application is expected to manage its own service binding; also, the
netlet descriptor created by the launcher will embed the JAR files,
hence making it several megabytes long.
Here are other important console commands:
- debug true|false
- Capture all standard output from local access point
netlets (if true) or stop this (if false, which is the
default). Only useful if access point netlets produce standard output.
Note that this is different from dmesg, which captures output
from (remote) netlets on the (remote) hosting service.
- dmesg
- Display latest standard I/O messages from the hosting service.
In practice this means when a netlet uses System.out.println
we can see it on the console.
- dump <value> [<file>]
- Output a single value, such as a warrant
or descriptor. If file is specified the value goes into that file,
otherwise it appears on the screen. If the value is a warrant or a
descriptor then the full XML is output rather than the short token
that the launcher usually outputs. Useful for saving these large XML
documents to a file and the passing them on to others.
- echo [<value>]*
- Display values.
- exec <app_label>.<app_command> [<arg>]*
- Execute the given
command on the named application. The exec can be omitted.
- list [<app_label>]
- List all applications, or all commands in
a specific application.
- quit
- Quits the console. Does not terminate applications.
- script <filename> [<value>]*
- Execute commands in the given
file. On entry to this file variables %0, %1, %2,
etc will have the values specified here. Previous values of %0,
%1, etc will be saved, then restored on exit.
- set [<name>=[<value>]]
- Display all variables, set one, or
unset one. Variables which carry large values, such as warrants, do
not have their literal values displayed. The set can be omitted.
If the value is omitted then the variable is unset.
- sleep <seconds>
- Pause for a number of seconds. Useful in a script
if we want to wait for an application to start up and deploy workers
before continuing.
- status [<prefix>]
- Show the status of the current hosting service
(the ``hosting MIB''). Can filter for only those dotted object
IDs with a particular prefix.
Nik Silver
2002-03-09